| 1 | <?php |
||
| 10 | class Exception extends \Exception { |
||
| 11 | 3 | static public function unknown($path, $error) { |
|
| 12 | 3 | $message = 'Unknown error (' . $error . ')'; |
|
| 13 | 3 | if ($path) { |
|
| 14 | 3 | $message .= ' for ' . $path; |
|
| 15 | } |
||
| 16 | |||
| 17 | 3 | return new Exception($message, is_string($error) ? 0 : $error); |
|
| 18 | } |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param array $exceptionMap |
||
| 22 | * @param mixed $error |
||
| 23 | * @param string $path |
||
| 24 | * @return Exception |
||
| 25 | */ |
||
| 26 | 79 | static public function fromMap(array $exceptionMap, $error, $path) { |
|
| 38 | } |
||
| 39 |