1 | <?php namespace Arcanedev\LaravelTracker\Exceptions; |
||
11 | class ExceptionFactory |
||
12 | { |
||
13 | /* ------------------------------------------------------------------------------------------------ |
||
14 | | Properties |
||
15 | | ------------------------------------------------------------------------------------------------ |
||
16 | */ |
||
17 | /** |
||
18 | * Supported exceptions. |
||
19 | * |
||
20 | * @var array |
||
21 | */ |
||
22 | protected static $supported = [ |
||
23 | E_ERROR => Errors\Error::class, |
||
24 | E_WARNING => Errors\Warning::class, |
||
25 | E_PARSE => Errors\Parse::class, |
||
26 | E_NOTICE => Errors\Notice::class, |
||
27 | E_CORE_ERROR => Errors\CoreError::class, |
||
28 | E_CORE_WARNING => Errors\CoreWarning::class, |
||
29 | E_COMPILE_ERROR => Errors\CompileError::class, |
||
30 | E_COMPILE_WARNING => Errors\CompileWarning::class, |
||
31 | E_USER_ERROR => Errors\UserError::class, |
||
32 | E_USER_WARNING => Errors\UserWarning::class, |
||
33 | E_USER_NOTICE => Errors\UserNotice::class, |
||
34 | E_STRICT => Errors\Strict::class, |
||
35 | E_RECOVERABLE_ERROR => Errors\RecoverableError::class, |
||
36 | E_DEPRECATED => Errors\Deprecated::class, |
||
37 | E_USER_DEPRECATED => Errors\UserDeprecated::class, |
||
38 | ]; |
||
39 | |||
40 | /* ------------------------------------------------------------------------------------------------ |
||
41 | | Main Functions |
||
42 | | ------------------------------------------------------------------------------------------------ |
||
43 | */ |
||
44 | /** |
||
45 | * Make exception. |
||
46 | * |
||
47 | * @param int $errorCode |
||
48 | * @param string $errorMessage |
||
49 | * |
||
50 | * @return mixed |
||
51 | */ |
||
52 | 12 | public static function make($errorCode, $errorMessage) |
|
58 | } |
||
59 |