From 109a7b4baa63b95124707db3c73c0c530953a084 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 18 Jul 2011 11:34:04 -0700 Subject: [PATCH] Refactoring Error class. --- system/error.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/system/error.php b/system/error.php index 763e88be..4bf65a54 100644 --- a/system/error.php +++ b/system/error.php @@ -45,7 +45,7 @@ public static function handle($e) call_user_func(Config::get('error.logger'), $severity, $message.' in '.$e->getFile().' on line '.$e->getLine()); } - static::show($e, $severity, $message, $e->getFile()); + static::show($e, $severity, $message); exit(1); } @@ -56,20 +56,19 @@ public static function handle($e) * @param Exception $e * @param string $severity * @param string $message - * @param string $file * @return void */ - private static function show($e, $severity, $message, $file) + private static function show($e, $severity, $message) { if (Config::get('error.detail')) { $view = View::make('exception') ->bind('severity', $severity) ->bind('message', $message) - ->bind('file', $file) + ->bind('file', $e->getFile()) ->bind('line', $e->getLine()) ->bind('trace', $e->getTraceAsString()) - ->bind('contexts', static::context($file, $e->getLine())); + ->bind('contexts', static::context($e->getFile(), $e->getLine())); Response::make($view, 500)->send(); }