1 2 3 4 5 6 7 8 9 10 |
function error_handler($severity, $message, $filename, $lineno) { if ( error_reporting() == 0 ) return; if ( error_reporting() && $severity ) throw new ErrorException($message, 0, $severity, $filename, $lineno); } set_error_handler('error_handler'); |