Refactoring Error class.
This commit is contained in:
@@ -45,7 +45,7 @@ class Error {
|
||||
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 @@ class Error {
|
||||
* @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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user