Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions src/ChainRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ private function doMatch($pathinfo, Request $request = null)
$info = $request
? "this request\n$request"
: "url '$pathinfo'";

throw $methodNotAllowed ?: new ResourceNotFoundException("None of the routers in the chain matched $info");
}

Expand Down
3 changes: 3 additions & 0 deletions src/ContentAwareGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public function generate($name, $parameters = [], $absolute = UrlGeneratorInterf

if (!$route instanceof SymfonyRoute) {
$hint = is_object($route) ? get_class($route) : gettype($route);

throw new RouteNotFoundException('Route of this document is not an instance of Symfony\Component\Routing\Route but: '.$hint);
}

Expand Down Expand Up @@ -176,6 +177,7 @@ protected function getRouteByContent($name, &$parameters)
}
} else {
$hint = is_object($name) ? get_class($name) : gettype($name);

throw new RouteNotFoundException("The route name argument '$hint' is not RouteReferrersReadInterface instance and there is no 'content_id' parameter");
}

Expand All @@ -184,6 +186,7 @@ protected function getRouteByContent($name, &$parameters)
$hint = ($this->contentRepository && $this->contentRepository->getContentId($content))
? $this->contentRepository->getContentId($content)
: get_class($content);

throw new RouteNotFoundException('Content document has no route: '.$hint);
}

Expand Down