Skip to content

Commit

Permalink
Merge pull request #29378 from nextcloud/fix/unhelpful-route-name-error
Browse files Browse the repository at this point in the history
Make the route name error more helpful
  • Loading branch information
kesselb authored Oct 22, 2021
2 parents 6b099ec + e36823f commit 1895a6d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/private/AppFramework/Routing/RouteConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,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');
}
[$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 @@ -93,7 +93,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');
}
[$controller, $action] = $split;

Expand Down

0 comments on commit 1895a6d

Please sign in to comment.