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;
}
}