Skip to content

Instantly share code, notes, and snippets.

@weatheredwatcher
Created February 18, 2010 05:34
Show Gist options
  • Save weatheredwatcher/307372 to your computer and use it in GitHub Desktop.
Save weatheredwatcher/307372 to your computer and use it in GitHub Desktop.
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