Merge pull request #16925 from nextcloud/bugfix/throwable-middleware
Handle throwables in the http dispatcher
This commit is contained in:
commit
7889961103
|
@ -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