Not always an Event Error need to throw an Exception.

This commit is contained in:
Stephan de Souza
2013-10-22 17:01:36 -03:00
parent df45025378
commit 560ff95f52
@@ -43,12 +43,15 @@ class ExceptionStrategy extends BaseExceptionStrategy {
case Application::ERROR_EXCEPTION:
default:
$response = $event->getResponse();
if (!$response || $response->getStatusCode() === 200) {
header('HTTP/1.0 500 Internal Server Error', true, 500);
$exception = $event->getParam('exception');
if($exception) {
$response = $event->getResponse();
if (!$response || $response->getStatusCode() === 200) {
header('HTTP/1.0 500 Internal Server Error', true, 500);
}
ob_clean();
$this->run->handleException($event->getParam('exception'));
}
ob_clean();
$this->run->handleException($event->getParam('exception'));
break;
}
}