Move output handling back up to Whoops\Run

This commit is contained in:
filp
2013-04-24 16:49:10 +01:00
parent fc5ca2541e
commit 0cef7df735
3 changed files with 49 additions and 24 deletions
+2 -5
View File
@@ -8,7 +8,7 @@ namespace Whoops\Handler;
use Whoops\Handler\Handler;
/**
* Catches an exception and converts it to a JSON
* Catches an exception and converts it to a JSON
* response. Additionally can also return exception
* frames for consumption by an API.
*/
@@ -71,9 +71,6 @@ class JsonResponseHandler extends Handler
return Handler::DONE;
}
// Remove any previous output
ob_get_level() and ob_end_clean();
$exception = $this->getException();
$response = array(
@@ -84,7 +81,7 @@ class JsonResponseHandler extends Handler
'line' => $exception->getLine()
)
);
if($this->addTraceToOutput()) {
$inspector = $this->getInspector();
$frames = $inspector->getFrames();