diff options
author | Daniel <mail@danielkesselberg.de> | 2021-10-22 22:33:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-22 22:33:35 +0200 |
commit | 1895a6dc573cdb46cfa1987e25d45781623fdb7d (patch) | |
tree | 33124389d50851aad9db424e74f2600f8754da69 | |
parent | 6b099ecfe59402291b5915c928bfb16f4f9d6675 (diff) | |
parent | e36823f79d92ba255e7296eb0a7603a4dee6ffe1 (diff) | |
download | nextcloud-server-1895a6dc573cdb46cfa1987e25d45781623fdb7d.tar.gz nextcloud-server-1895a6dc573cdb46cfa1987e25d45781623fdb7d.zip |
Merge pull request #29378 from nextcloud/fix/unhelpful-route-name-error
Make the route name error more helpful
-rw-r--r-- | lib/private/AppFramework/Routing/RouteConfig.php | 2 | ||||
-rw-r--r-- | lib/private/AppFramework/Routing/RouteParser.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/AppFramework/Routing/RouteConfig.php b/lib/private/AppFramework/Routing/RouteConfig.php index 0fde866fb7c..3986abd6d6e 100644 --- a/lib/private/AppFramework/Routing/RouteConfig.php +++ b/lib/private/AppFramework/Routing/RouteConfig.php @@ -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; diff --git a/lib/private/AppFramework/Routing/RouteParser.php b/lib/private/AppFramework/Routing/RouteParser.php index d2e41f7498e..1b3a6c1255a 100644 --- a/lib/private/AppFramework/Routing/RouteParser.php +++ b/lib/private/AppFramework/Routing/RouteParser.php @@ -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; |