Fixed exception handling
This commit is contained in:
parent
ef4ba5a348
commit
8e39f08cf5
2 changed files with 2 additions and 1 deletions
|
@ -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();
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ class Dispatcher
|
|||
$errorController = new ErrorController;
|
||||
$errorController->simpleExceptionView($e);
|
||||
}
|
||||
catch (SimpleException $e)
|
||||
catch (Exception $e)
|
||||
{
|
||||
$errorController = new ErrorController;
|
||||
$errorController->seriousExceptionView($e);
|
||||
|
|
Loading…
Reference in a new issue