summaryrefslogtreecommitdiffstats
path: root/application/libraries/ExceptionHandler.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/libraries/ExceptionHandler.php')
-rw-r--r--application/libraries/ExceptionHandler.php12
1 files changed, 2 insertions, 10 deletions
diff --git a/application/libraries/ExceptionHandler.php b/application/libraries/ExceptionHandler.php
index acfa97163..ed7f9b8c5 100644
--- a/application/libraries/ExceptionHandler.php
+++ b/application/libraries/ExceptionHandler.php
@@ -15,8 +15,6 @@ class ExceptionHandler {
set_error_handler(array("\libraries\ExceptionHandler", "error_handler"));
set_exception_handler(array("\libraries\ExceptionHandler", 'exception_handler'));
register_shutdown_function(array("\libraries\ExceptionHandler", "check_for_fatal"));
- assert_options(ASSERT_ACTIVE, true);
- assert_options(ASSERT_CALLBACK, array("\libraries\ExceptionHandler", '_assert_failure'));
}
static function error_handler($errno, $errstr, $errfile, $errline)
@@ -130,7 +128,7 @@ class ExceptionHandler {
}
$message = "$message";
- include APPPATH."/errors/error_general.php";
+ include VIEWPATH."/errors/html/error_general.php";
}
/**
@@ -139,16 +137,10 @@ class ExceptionHandler {
static public function check_for_fatal()
{
$error = error_get_last();
- if ($error["type"] == E_ERROR) {
+ if (isset($error) && $error["type"] == E_ERROR) {
self::exception_handler(new \ErrorException(
$error["message"], 0, $error["type"], $error["file"], $error["line"]));
}
}
- static public function assert_failure($file, $line, $expr, $message = "")
- {
- self::exception_handler(new Exception("assert($expr): Assertion failed in $file at line $line".($message != "" ? " with message: '$message'" : "")));
- exit(1);
- }
-
}