Created
February 18, 2010 05:34
-
-
Save weatheredwatcher/307372 to your computer and use it in GitHub Desktop.
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
function myErrorHandler($errno, $errstr, $errfile, $errline) | |
{ | |
switch ($errno) { | |
case E_USER_ERROR: | |
//here is what you display (or do) for a user error | |
exit(1); | |
break; | |
case E_USER_WARNING: | |
//here is where you display (or do) for a user warning | |
break; | |
case E_USER_NOTICE: | |
//here is where you display (or do) for a user notice | |
break; | |
default: | |
//here is where you catch any unknown errors | |
break; | |
} | |
/* Don't execute PHP internal error handler */ | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment