1 | <?php |
||
7 | class PcreRegexException extends RegexException |
||
8 | { |
||
9 | |||
10 | public static $messages = array( |
||
11 | \PREG_INTERNAL_ERROR => 'Internal error', |
||
12 | \PREG_BACKTRACK_LIMIT_ERROR => 'Backtrack limit was exhausted', |
||
13 | \PREG_RECURSION_LIMIT_ERROR => 'Recursion limit was exhausted', |
||
14 | \PREG_BAD_UTF8_ERROR => 'Malformed UTF-8 data', |
||
15 | // HHVM fix, constant PREG_BAD_UTF8_OFFSET_ERROR replaced by its number |
||
16 | 5 => 'The offset didn\'t correspond to the begin of a valid UTF-8 code point', |
||
17 | ); |
||
18 | |||
19 | /** |
||
20 | * If code is provided, but no message, it uses default PREG error messages. |
||
21 | * |
||
22 | * @param string $message Message |
||
23 | * @param int|null $code Code |
||
24 | * @param string|string[]|null $pattern Pattern |
||
25 | */ |
||
26 | 63 | public function __construct($message, $code = null, $pattern = null) |
|
34 | } |
||
35 |