added more information to an exception to ease debugging

This commit is contained in:
Fabien Potencier
2010-11-26 21:13:26 +01:00
parent dc71bf1a82
commit ab2a9ac459
+1 -1
View File
@@ -220,7 +220,7 @@ class Twig_Parser implements Twig_ParserInterface
||
(!$node instanceof Twig_Node_Text && !$node instanceof Twig_Node_BlockReference && !$node instanceof Twig_Node_Import)
) {
throw new Twig_Error_Syntax('A template that extends another one cannot have a body', $node->getLine(), $this->stream->getFilename());
throw new Twig_Error_Syntax(sprintf('A template that extends another one cannot have a body (%s).', $node), $node->getLine(), $this->stream->getFilename());
}
}
}