1 | <?php |
||
18 | class ErrorException extends \ErrorException |
||
19 | { |
||
20 | /** |
||
21 | * This constant represents a fatal error in the HHVM engine. |
||
22 | * |
||
23 | * PHP Zend runtime won't call the error handler on fatals, HHVM will, with an error code of 16777217 |
||
24 | * We will handle fatal error a bit different on HHVM. |
||
25 | * @see https://github.com/facebook/hhvm/blob/master/hphp/runtime/base/runtime-error.h#L62 |
||
26 | * @since 2.0.6 |
||
27 | */ |
||
28 | const E_HHVM_FATAL_ERROR = 16777217; // E_ERROR | (1 << 24) |
||
29 | |||
30 | |||
31 | /** |
||
32 | * Constructs the exception. |
||
33 | * @link http://php.net/manual/en/errorexception.construct.php |
||
34 | * @param $message [optional] |
||
35 | * @param $code [optional] |
||
36 | * @param $severity [optional] |
||
37 | * @param $filename [optional] |
||
38 | * @param $lineno [optional] |
||
39 | * @param $previous [optional] |
||
40 | */ |
||
41 | public function __construct($message = '', $code = 0, $severity = 1, $filename = __FILE__, $lineno = __LINE__, \Exception $previous = null) |
||
70 | |||
71 | /** |
||
72 | * Returns if error is one of fatal type. |
||
73 | * |
||
74 | * @param array $error error got from error_get_last() |
||
75 | * @return boolean if error is one of fatal type |
||
76 | */ |
||
77 | public static function isFatalError($error) |
||
81 | |||
82 | /** |
||
83 | * @return string the user-friendly name of this exception |
||
84 | */ |
||
85 | public function getName() |
||
108 | } |
||
109 |