diff --git a/HttpServer/Events/OnRequest.php b/HttpServer/Events/OnRequest.php index 3a00f65f..6eef5632 100644 --- a/HttpServer/Events/OnRequest.php +++ b/HttpServer/Events/OnRequest.php @@ -42,6 +42,7 @@ class OnRequest extends Callback } return \router()->dispatch(); } catch (ExitException | Error | \Throwable $exception) { + $this->addError($exception); if ($exception instanceof ExitException) { return \send($exception->getMessage(), $exception->getCode()); }