Merge pull request #16925 from nextcloud/bugfix/throwable-middleware

Handle throwables in the http dispatcher
This commit is contained in:
Roeland Jago Douma 2019-08-29 20:24:13 +02:00 committed by GitHub
commit 7889961103
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -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(