mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 05:44:24 +00:00
35 lines
777 B
PHP
35 lines
777 B
PHP
<?php
|
|
|
|
/**
|
|
* Chill is a software for social workers
|
|
*
|
|
* For the full copyright and license information, please view
|
|
* the LICENSE file that was distributed with this source code.
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Chill\DocGeneratorBundle\GeneratorDriver\Exception;
|
|
|
|
use RuntimeException;
|
|
|
|
/**
|
|
* A exception to throw when there are syntax errors in the
|
|
* template file.
|
|
*/
|
|
class TemplateException extends RuntimeException
|
|
{
|
|
private array $errors;
|
|
|
|
public function __construct(array $errors, $code = 0, ?Throwable $previous = null)
|
|
{
|
|
parent::__construct('Error while generating document from template', $code, $previous);
|
|
$this->errors = $errors;
|
|
}
|
|
|
|
public function getErrors(): array
|
|
{
|
|
return $this->errors;
|
|
}
|
|
}
|