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
Make the route name error more helpful
As a developer I have no clue what "Invalid route name" means. If the
exception gives me a hint I might find it easier to figure out why my
route triggers this error.

Signed-off-by: Christoph Wurst <[email protected]>
  • Loading branch information
ChristophWurst authored and backportbot[bot] committed Oct 22, 2021
commit 48d97fa8651b2bc1641e623545f870b0d9f99147
2 changes: 1 addition & 1 deletion lib/private/AppFramework/Routing/RouteConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ protected function processRoute(array $route, string $routeNamePrefix = ''): voi

$split = explode('#', $name, 2);
if (count($split) !== 2) {
throw new \UnexpectedValueException('Invalid route name');
throw new \UnexpectedValueException('Invalid route name: use the format foo#bar to reference FooController::bar');
}
list($controller, $action) = $split;

Expand Down
2 changes: 1 addition & 1 deletion lib/private/AppFramework/Routing/RouteParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ private function processRoute(array $route, string $appName, string $routeNamePr

$split = explode('#', $name, 2);
if (count($split) !== 2) {
throw new \UnexpectedValueException('Invalid route name');
throw new \UnexpectedValueException('Invalid route name: use the format foo#bar to reference FooController::bar');
}
list($controller, $action) = $split;

Expand Down