Remove special handling for error views. No longer needed.
This commit is contained in:
parent
c54173bc40
commit
ce20d7b9e3
|
@ -38,8 +38,6 @@ public static function handle($e)
|
||||||
|
|
||||||
$severity = (array_key_exists($e->getCode(), static::$levels)) ? static::$levels[$e->getCode()] : $e->getCode();
|
$severity = (array_key_exists($e->getCode(), static::$levels)) ? static::$levels[$e->getCode()] : $e->getCode();
|
||||||
|
|
||||||
$file = static::file($e);
|
|
||||||
|
|
||||||
$message = rtrim($e->getMessage(), '.');
|
$message = rtrim($e->getMessage(), '.');
|
||||||
|
|
||||||
if (Config::get('error.log'))
|
if (Config::get('error.log'))
|
||||||
|
@ -47,27 +45,11 @@ public static function handle($e)
|
||||||
call_user_func(Config::get('error.logger'), $severity, $message.' in '.$e->getFile().' on line '.$e->getLine());
|
call_user_func(Config::get('error.logger'), $severity, $message.' in '.$e->getFile().' on line '.$e->getLine());
|
||||||
}
|
}
|
||||||
|
|
||||||
static::show($e, $severity, $message, $file);
|
static::show($e, $severity, $message, $e->getFile());
|
||||||
|
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the path to the file in which an exception occured.
|
|
||||||
*
|
|
||||||
* @param Exception $e
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
private static function file($e)
|
|
||||||
{
|
|
||||||
if (strpos($e->getFile(), 'view.php') !== false and strpos($e->getFile(), "eval()'d code") !== false)
|
|
||||||
{
|
|
||||||
return APP_PATH.'views/'.View::$last.EXT;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $e->getFile();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the error view.
|
* Show the error view.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue