8000 Merge pull request #507 from sparksp/develop-patch-2 · code4pub/laravel@cac5eba · GitHub
[go: up one dir, main page]

Skip to content

Commit cac5eba

Browse files
committed
Merge pull request laravel#507 from sparksp/develop-patch-2
Don't show the trace on shutdown, it's useless.
2 parents 3670423 + 56fac66 commit cac5eba

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

laravel/error.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Error {
88
* @param Exception $exception
99
* @return void
1010
*/
11-
public static function exception($exception)
11+
public static function exception($exception, $trace = true)
1212
{
1313
static::log($exception);
1414

@@ -23,9 +23,13 @@ public static function exception($exception)
2323
<h3>Message:</h3>
2424
<pre>".$exception->getMessage()."</pre>
2525
<h3>Location:</h3>
26-
<pre>".$exception->getFile()." on line ".$exception->getLine()."</pre>
26+
<pre>".$exception->getFile()." on line ".$exception->getLine()."</pre>";
27+
if ($trace)
28+
{
29+
echo "
2730
<h3>Stack Trace:</h3>
2831
<pre>".$exception->getTraceAsString()."</pre></html>";
32+
}
2933
}
3034

3135
// If we're not using detailed error messages, we'll use the event
@@ -83,7 +87,7 @@ public static function shutdown()
8387
{
8488
extract($error, EXTR_SKIP);
8589

86-
static::exception(new \ErrorException($message, $type, 0, $file, $line));
90+
static::exception(new \ErrorException($message, $type, 0, $file, $line), false);
8791
}
8892
}
8993

0 commit comments

Comments
 (0)
0