소스 검색

Merge remote branch 'Seldaek/exception_msg'

* Seldaek/exception_msg:
  [Config] Improved exception message a bit
Fabien Potencier 14 년 전
부모
커밋
a972770371
1개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 5 3
      src/Symfony/Component/Config/Definition/ArrayNode.php

+ 5 - 3
src/Symfony/Component/Config/Definition/ArrayNode.php

@@ -237,7 +237,7 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface
     /**
      * Sets the node prototype.
      *
-     * @param PrototypeNodeInterface $node 
+     * @param PrototypeNodeInterface $node
      * @throws \RuntimeException if the node doesn't have concrete children
      */
     public function setPrototype(PrototypeNodeInterface $node)
@@ -276,7 +276,7 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface
     /**
      * Finalises the value of this node.
      *
-     * @param mixed $value 
+     * @param mixed $value
      * @return mixed The finalised value
      * @throws UnsetKeyException
      * @throws InvalidConfigurationException if the node doesn't have enough children
@@ -470,7 +470,9 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface
                 if (!$this->allowNewKeys) {
                     throw new InvalidConfigurationException(sprintf(
                         'You are not allowed to define new elements for path "%s". '
-                       .'Please define all elements for this path in one config file.',
+                       .'Please define all elements for this path in one config file. '
+                       .'If you are trying to overwrite an element, make sure you redefine it '
+                       .'with the same name.',
                         $this->getPath()
                     ));
                 }