Skip to content

Commit

Permalink
Merge pull request #661 from skipperbent/v5-development
Browse files Browse the repository at this point in the history
Reverted exception handling to old behavior (issue: #660)
  • Loading branch information
skipperbent authored Apr 24, 2023
2 parents ad765b9 + e105f26 commit 9b8843a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/Pecee/SimpleRouter/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -443,12 +443,8 @@ public function routeRequest(): ?string
}
}

} catch (\Throwable $e) {
if ($e instanceof Exception) {
return $this->handleException($e);
}

return $this->handleException(new Exception($e->getMessage(), $e->getCode()));
} catch (Exception $e) {
return $this->handleException($e);
}

if ($methodNotAllowed === true) {
Expand Down

0 comments on commit 9b8843a

Please sign in to comment.