1 | <?php |
||
10 | class Core |
||
11 | { |
||
12 | |||
13 | /** |
||
14 | * Whether errors should throw exceptions or just be stored. |
||
15 | * |
||
16 | * @var bool |
||
17 | * |
||
18 | * @see static::$errors |
||
19 | */ |
||
20 | public $strict = false; |
||
21 | |||
22 | /** |
||
23 | * List of errors that occurred during lexing. |
||
24 | * |
||
25 | * Usually, the lexing does not stop once an error occurred because that |
||
26 | * error might be false positive or a partial result (even a bad one) |
||
27 | * might be needed. |
||
28 | * |
||
29 | * @var Exception[] |
||
30 | * |
||
31 | * @see Core::error() |
||
32 | */ |
||
33 | public $errors = array(); |
||
34 | |||
35 | /** |
||
36 | * Creates a new error log. |
||
37 | * |
||
38 | * @param Exception $error The error exception. |
||
39 | * |
||
40 | * @throws Exception Throws the exception, if strict mode is enabled. |
||
41 | * |
||
42 | * @return void |
||
43 | */ |
||
44 | public function error($error) |
||
51 | } |
||
52 |