Refactoring Error class.
This commit is contained in:
parent
ce20d7b9e3
commit
109a7b4baa
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue