Commit f6ff5370 authored by Taylor Otwell's avatar Taylor Otwell

Tweaking error handlers in the front controller.

parent 69d1377f
......@@ -45,13 +45,15 @@ error_reporting((System\Config::get('error.detail')) ? E_ALL | E_STRICT : 0);
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 @@ register_shutdown_function(function()
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']));
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment