mirror of
https://github.com/filp/whoops.git
synced 2026-09-03 05:57:12 +00:00
Not always an Event Error need to throw an Exception.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user