Merge pull request #655 from skipperbent/v5-development

Version 5.3.0.1
This commit is contained in:
Simon Sessingø
2023-04-08 20:00:55 +02:00
committed by GitHub
+5 -1
View File
@@ -443,10 +443,14 @@ class Router
}
}
} catch (Exception $e) {
} catch (\Throwable $e) {
if ($e instanceof Exception) {
return $this->handleException($e);
}
return $this->handleException(new Exception($e->getMessage(), $e->getCode()));
}
if ($methodNotAllowed === true) {
$message = sprintf('Route "%s" or method "%s" not allowed.', $this->request->getUrl()->getPath(), $this->request->getMethod());
return $this->handleException(new NotFoundHttpException($message, 403));