Bläddra i källkod

[DependencyInjection] tweaked an error message to ease debugging

Fabien Potencier 14 år sedan
förälder
incheckning
35ee15d131
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php

+ 1 - 1
src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php

@@ -86,7 +86,7 @@ EOF;
         $class = $this->dumpValue($definition->getClass());
 
         if (0 === strpos($class, "'") && !preg_match('/^\'[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(\\\{2}[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)*\'$/', $class)) {
-            throw new \InvalidArgumentException(sprintf('"%s" is not a valid class name.', $class));
+            throw new \InvalidArgumentException(sprintf('"%s" is not a valid class name for the "%s" service.', $class, $id));
         }
 
         $arguments = array();