Handle throwables in the http dispatcher
Co-authored-by: Arthur Schiwon <blizzz@arthur-schiwon.de> Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
130fdf5006
commit
299759b836
|
@ -105,6 +105,10 @@ class Dispatcher {
|
|||
} catch(\Exception $exception){
|
||||
$response = $this->middlewareDispatcher->afterException(
|
||||
$controller, $methodName, $exception);
|
||||
} catch(\Throwable $throwable) {
|
||||
$exception = new \Exception($throwable->getMessage(), $throwable->getCode(), $throwable);
|
||||
$response = $this->middlewareDispatcher->afterException(
|
||||
$controller, $methodName, $exception);
|
||||
}
|
||||
|
||||
$response = $this->middlewareDispatcher->afterController(
|
||||
|
|
Loading…
Reference in New Issue