aboutsummaryrefslogtreecommitdiff
path: root/lib/Exceptions.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/Exceptions.php8
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 {}