If you use the ErrorException exception to have a unified error management, I'll advise you to test against error_reporting in the error handler, not in the exception handler as you might encounter some headaches like blank pages as error_reporting might not be transmitted to exception handler.So instead of :<?phpfunction exception_error_handler($errno, $errstr, $errfile, $errline ){ throw new ErrorException($errstr, 0, $errno, $errfile, $errline);}set_error_handler("exception_error_handler");function catchException($e){ if (error_reporting() === 0) { return; } }set_exception_handler('catchException');?>It would be better to do :<?phpfunction exception_error_handler($errno, $errstr, $errfile, $errline ){ if (error_reporting() === 0) { return; } throw new ErrorException($errstr, 0, $errno, $errfile, $errline);}set_error_handler("exception_error_handler");function catchException($e){ }set_exception_handler('catchException');?>