diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-08-29 17:18:39 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-08-29 17:19:14 +0200 |
commit | 299759b8369421d816bff8c6587e66051444cee9 (patch) | |
tree | 28a3ef50a8dc40e3038294d5b196a1951db84806 /lib/private/AppFramework | |
parent | 130fdf50061315b377c6d8916902326d614f66b0 (diff) | |
download | nextcloud-server-299759b8369421d816bff8c6587e66051444cee9.tar.gz nextcloud-server-299759b8369421d816bff8c6587e66051444cee9.zip |
Handle throwables in the http dispatcher
Co-authored-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private/AppFramework')
-rw-r--r-- | lib/private/AppFramework/Http/Dispatcher.php | 4 |
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( |