8000 [Routing] improved exception message when giving an invalid route name. · phreaknerd/symfony@f7647f9 · GitHub
[go: up one dir, main page]

Skip to content

Commit f7647f9

Browse files
author
Hugo Hamon
committed
[Routing] improved exception message when giving an invalid route name.
1 parent e4ebffb commit f7647f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Routing/RouteCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function getIterator()
9595
public function add($name, Route $route)
9696
{
9797
if (!preg_match('/^[a-z0-9A-Z_.]+$/', $name)) {
98-
throw new \InvalidArgumentException(sprintf('Name "%s" contains non valid characters for a route name.', $name));
98+
throw new \InvalidArgumentException(sprintf('The provided route name "%s" contains non valid characters. A route name must only contain digits (0-9), letters (A-Z), underscores (_) and dots (.).', $name));
9999
}
100100

101101
$parent = $this;

0 commit comments

Comments
 (0)
0