소스 검색

[DependencyInjection] changed exception class in __call()

Fabien Potencier 15 년 전
부모
커밋
bc29f81e8e
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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]));