From 56fac668b39f5f926962196b63b6b59ac1ee5cb2 Mon Sep 17 00:00:00 2001 From: Phill Sparks Date: Fri, 6 Apr 2012 10:41:10 +0100 Subject: [PATCH] Don't show the trace on shutdown, it's useless. Signed-off-by: Phill Sparks --- laravel/error.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/laravel/error.php b/laravel/error.php index bf668d8a..4c8cfd50 100644 --- a/laravel/error.php +++ b/laravel/error.php @@ -8,7 +8,7 @@ class Error { * @param Exception $exception * @return void */ - public static function exception($exception) + public static function exception($exception, $trace = true) { static::log($exception); @@ -23,9 +23,13 @@ public static function exception($exception)

Message:

".$exception->getMessage()."

Location:

-
".$exception->getFile()." on line ".$exception->getLine()."
+
".$exception->getFile()." on line ".$exception->getLine()."
"; + if ($trace) + { + echo "

Stack Trace:

".$exception->getTraceAsString()."
"; + } } // If we're not using detailed error messages, we'll use the event @@ -62,8 +66,6 @@ public static function native($code, $error, $file, $line) if (in_array($code, Config::get('error.ignore'))) { return static::log($exception); - - return true; } static::exception($exception); @@ -85,7 +87,7 @@ public static function shutdown() { extract($error, EXTR_SKIP); - static::exception(new \ErrorException($message, $type, 0, $file, $line)); + static::exception(new \ErrorException($message, $type, 0, $file, $line), false); } }