Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Handle throwables in the http dispatcher
Co-authored-by: Arthur Schiwon <[email protected]>

Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Aug 29, 2019
commit 299759b8369421d816bff8c6587e66051444cee9
4 changes: 4 additions & 0 deletions lib/private/AppFramework/Http/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ public function dispatch(Controller $controller, string $methodName): array {
} 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(
Expand Down