Explorar o código

[DependencyInjection] changed exception class in __call()

Fabien Potencier %!s(int64=15) %!d(string=hai) anos
pai
achega
bc29f81e8e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Symfony/Components/DependencyInjection/Container.php

+ 1 - 1
src/Symfony/Components/DependencyInjection/Container.php

@@ -339,7 +339,7 @@ class Container implements ContainerInterface, \ArrayAccess
   {
     if (!preg_match('/^get(.+)Service$/', $method, $match))
     {
-      throw new \RuntimeException(sprintf('Call to undefined method %s::%s.', get_class($this), $method));
+      throw new \BadMethodCallException(sprintf('Call to undefined method %s::%s.', get_class($this), $method));
     }
 
     return $this->getService(self::underscore($match[1]));