mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
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 <christoph@winzerhof-wurst.at>
This commit is contained in:
parent
e75d226fba
commit
e36823f79d
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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue