Merge pull request #298 from jatubio/patch-2

Added more info on route or method not allowed exception
This commit is contained in:
Simon Sessingø
2017-10-12 15:53:03 +02:00
committed by GitHub
+3 -2
View File
@@ -285,7 +285,8 @@ class Router
}
if ($routeNotAllowed === true) {
$this->handleException(new HttpException('Route or method not allowed', 403));
$message = sprintf('Route "%s" or method "%s" not allowed.', $this->request->getUri()->getPath(), $this->request->getMethod());
$this->handleException(new HttpException($message, 403));
}
if ($this->request->getLoadedRoute() === null) {
@@ -594,4 +595,4 @@ class Router
return $this;
}
}
}