diff --git a/flight/Engine.php b/flight/Engine.php index 53fbcfb..0fd9c50 100644 --- a/flight/Engine.php +++ b/flight/Engine.php @@ -403,7 +403,7 @@ class Engine { /** * Sends an HTTP 500 response for any errors. * - * @param object $e Thrown exception + * @param \Exception|\Throwable $e Thrown exception */ public function _error($e) { $msg = sprintf('

500 Internal Server Error

'. @@ -421,7 +421,9 @@ class Engine { ->write($msg) ->send(); } - catch (\Throwable $t) { + catch (\Throwable $t) { // PHP 7.0+ + exit($msg); + } catch(\Exception $e) { // PHP < 7 exit($msg); } }