Commit ce20d7b9 authored by Taylor Otwell's avatar Taylor Otwell

Remove special handling for error views. No longer needed.

parent c54173bc
...@@ -38,8 +38,6 @@ class Error { ...@@ -38,8 +38,6 @@ class Error {
$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 @@ class Error { ...@@ -47,27 +45,11 @@ class Error {
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.
* *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment