Skip to content

Commit 9b8843a

Browse files
authored
Merge pull request #661 from skipperbent/v5-development
Reverted exception handling to old behavior (issue: #660)
2 parents ad765b9 + e105f26 commit 9b8843a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/Pecee/SimpleRouter/Router.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -443,12 +443,8 @@ public function routeRequest(): ?string
443443
}
444444
}
445445

446-
} catch (\Throwable $e) {
447-
if ($e instanceof Exception) {
448-
return $this->handleException($e);
449-
}
450-
451-
return $this->handleException(new Exception($e->getMessage(), $e->getCode()));
446+
} catch (Exception $e) {
447+
return $this->handleException($e);
452448
}
453449

454450
if ($methodNotAllowed === true) {

0 commit comments

Comments
 (0)