]> source.dussan.org Git - nextcloud-server.git/commitdiff
Make the route name error more helpful 29399/head
authorChristoph Wurst <christoph@winzerhof-wurst.at>
Fri, 22 Oct 2021 08:41:27 +0000 (10:41 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Fri, 22 Oct 2021 20:38:58 +0000 (20:38 +0000)
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>
lib/private/AppFramework/Routing/RouteConfig.php
lib/private/AppFramework/Routing/RouteParser.php

index c522d3436cab841a517780559f8bf37e051f1c56..2e9f15475b7491a319245e7df199155eaffeef4c 100644 (file)
@@ -131,7 +131,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');
                }
                list($controller, $action) = $split;
 
index 8511ff9ee391abeb33c4c20de1c699c24c3cb575..4b1b36b7550e6a901af51c30a7199a5ba3ac2d78 100644 (file)
@@ -94,7 +94,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');
                }
                list($controller, $action) = $split;