diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Exceptions.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Exceptions.php b/lib/Exceptions.php index f6f9d24..acdb1b6 100644 --- a/lib/Exceptions.php +++ b/lib/Exceptions.php @@ -1,4 +1,12 @@ <?php +function exception_error_handler($errno, $errstr, $errfile, $errline ) { + if (ini_get('error_reporting') == 0) + return; + + throw new ErrorException($errstr, 0, $errno, $errfile, $errline); +} +set_error_handler("exception_error_handler"); + class NotFoundException extends Exception {} class ScheduleException extends Exception {} |