Commit a94c6bd7 authored by Taylor Otwell's avatar Taylor Otwell

Refactoring the error class.

parent 1916e27d
...@@ -34,10 +34,7 @@ class Error { ...@@ -34,10 +34,7 @@ class Error {
// Clear the output buffer so nothing is sent to the browser except the error // Clear the output buffer so nothing is sent to the browser except the error
// message. This prevents any views that have already been rendered from being // message. This prevents any views that have already been rendered from being
// in an incomplete or erroneous state. // in an incomplete or erroneous state.
if (ob_get_level() > 0) if (ob_get_level() > 0) ob_clean();
{
ob_clean();
}
$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();
...@@ -76,7 +73,7 @@ class Error { ...@@ -76,7 +73,7 @@ class Error {
} }
else else
{ {
Response::make(View::make('error/500'), 500)->send(); Response::error('500')->send();
} }
} }
......
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