From f6ff5370ef0b46d45fc5b6484d988ae4c9952ed4 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 11 Jul 2011 07:47:54 -0700 Subject: [PATCH] Tweaking error handlers in the front controller. --- public/index.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/index.php b/public/index.php index a3b21fd6..eb184739 100644 --- a/public/index.php +++ b/public/index.php @@ -45,13 +45,15 @@ set_exception_handler(function($e) { require_once SYS_PATH.'error'.EXT; + System\Error::handle($e); }); set_error_handler(function($number, $error, $file, $line) { require_once SYS_PATH.'error'.EXT; - System\Error::handle(new ErrorException($error, 0, $number, $file, $line)); + + System\Error::handle(new ErrorException($error, $number, 0, $file, $line)); }); register_shutdown_function(function() @@ -59,7 +61,8 @@ if ( ! is_null($error = error_get_last())) { require_once SYS_PATH.'error'.EXT; - System\Error::handle(new ErrorException($error['message'], 0, $error['type'], $error['file'], $error['line'])); + + System\Error::handle(new ErrorException($error['message'], $error['type'], 0, $error['file'], $error['line'])); } });