blob: c38b3ff6105e6aa4381912721523ce1eda98e1de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
<?php
namespace exTpl;
use Exception;
/**
* Exception class used to report template parse errors.
*/
class TemplateParserException extends Exception
{
public function __construct(string $message, Scanner $scanner)
{
$type = $scanner->tokenType();
$value = is_int($type) ? $scanner->tokenValue() : $type;
parent::__construct("$message at \"$value\"");
}
}
|