Remove special handling for error views. No longer needed.

This commit is contained in:
Taylor Otwell 2011-07-18 11:33:01 -07:00
parent c54173bc40
commit ce20d7b9e3
1 changed files with 1 additions and 19 deletions

View File

@ -38,8 +38,6 @@ public static function handle($e)
$severity = (array_key_exists($e->getCode(), static::$levels)) ? static::$levels[$e->getCode()] : $e->getCode();
$file = static::file($e);
$message = rtrim($e->getMessage(), '.');
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());
}
static::show($e, $severity, $message, $file);
static::show($e, $severity, $message, $e->getFile());
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.
*