diff --git a/src/Controllers/ErrorController.php b/src/Controllers/ErrorController.php index 144f9331..f6a51d0d 100644 --- a/src/Controllers/ErrorController.php +++ b/src/Controllers/ErrorController.php @@ -19,6 +19,7 @@ class ErrorController extends AbstractController { \Chibi\Util\Headers::setCode(400); Messenger::fail($exception->getMessage()); + $context = Core::getContext(); $context->transport->exception = $exception; $context->transport->queries = \Chibi\Database::getLogs(); diff --git a/src/Dispatcher.php b/src/Dispatcher.php index f557a2d9..448cfda0 100644 --- a/src/Dispatcher.php +++ b/src/Dispatcher.php @@ -35,7 +35,7 @@ class Dispatcher $errorController = new ErrorController; $errorController->simpleExceptionView($e); } - catch (SimpleException $e) + catch (Exception $e) { $errorController = new ErrorController; $errorController->seriousExceptionView($e);