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