1 | <?php |
||
5 | class RegexException extends \RuntimeException |
||
6 | { |
||
7 | |||
8 | /** |
||
9 | * If pattern is provided, it is appended to the message. |
||
10 | * |
||
11 | * @param string $message Message |
||
12 | * @param int|null $code Code |
||
13 | * @param string|string[]|null $pattern Pattern |
||
14 | */ |
||
15 | 82 | public function __construct($message, $code = null, $pattern = null) |
|
27 | |||
28 | /** |
||
29 | * Return exception message without function name. |
||
30 | * |
||
31 | * Usual exception message looks like this: |
||
32 | * <pre> |
||
33 | * preg_match(): Some error occurred |
||
34 | * </pre> |
||
35 | * So we strip the "function(): " part. |
||
36 | * |
||
37 | * @return string |
||
38 | */ |
||
39 | 76 | public function getShortMessage() |
|
48 | } |
||
49 |