-
-
Save victorknust/9786117 to your computer and use it in GitHub Desktop.
This file contains 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
function myErrorHandler($errno, $errstr, $errfile, $errline) | |
{ | |
if (!(error_reporting() & $errno)) { | |
// This error code is not included in error_reporting | |
return; | |
} | |
echo "<b>ERROR!</b> [$errno] $errstr<br />\n"; | |
echo " Fatal error on line $errline in file $errfile"; | |
echo ", PHP " . PHP_VERSION . " (" . PHP_OS . ")<br />\n"; | |
echo "Aborting...<br />\n"; | |
exit(1); | |
break; | |
} | |
$old_error_handler = set_error_handler("myErrorHandler"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment