summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-08-29 20:24:13 +0200
committerGitHub <noreply@github.com>2019-08-29 20:24:13 +0200
commit7889961103d63a07e056d29aa0eb79cd50ef4760 (patch)
treee87e37b87bb8891c36365433f4760521c0dfcfc0 /lib
parent91003c9c90f23716a1d6e8ac1c0863e5a8368b0d (diff)
parent299759b8369421d816bff8c6587e66051444cee9 (diff)
downloadnextcloud-server-7889961103d63a07e056d29aa0eb79cd50ef4760.tar.gz
nextcloud-server-7889961103d63a07e056d29aa0eb79cd50ef4760.zip
Merge pull request #16925 from nextcloud/bugfix/throwable-middleware
Handle throwables in the http dispatcher
Diffstat (limited to 'lib')
-rw-r--r--lib/private/AppFramework/Http/Dispatcher.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/AppFramework/Http/Dispatcher.php b/lib/private/AppFramework/Http/Dispatcher.php
index 7b9ad015de6..0b9422f9fc9 100644
--- a/lib/private/AppFramework/Http/Dispatcher.php
+++ b/lib/private/AppFramework/Http/Dispatcher.php
@@ -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(