Last active
December 27, 2015 10:59
-
-
Save funivan/7315357 to your computer and use it in GitHub Desktop.
errors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <? | |
| set_error_handler('exceptions_error_handler'); | |
| function exceptions_error_handler($severity, $message, $filename, $lineno) { | |
| if (error_reporting() == 0) { | |
| return; | |
| } | |
| if (error_reporting() & $severity) { | |
| throw new ErrorException($message, 0, $severity, $filename, $lineno); | |
| } | |
| } | |
| $a[1] = 'jfksjfks'; | |
| try { | |
| $b = $a[0]; | |
| } catch (Exception $e) { | |
| echo "jsdlkjflsjfkjl"; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment