Merge pull request #29378 from nextcloud/fix/unhelpful-route-name-error

Make the route name error more helpful
pull/29400/head
Daniel 2021-10-22 22:33:35 +07:00 committed by GitHub
commit 1895a6dc57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

@ -130,7 +130,7 @@ class RouteConfig {
$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;

@ -93,7 +93,7 @@ class RouteParser {
$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;