From: Fabien Potencier Date: Fri, 26 Nov 2010 20:13:26 +0000 (+0100) Subject: added more information to an exception to ease debugging X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=ab2a9ac459943c1a974fdf7a601400a84b0eaac4;p=web%2Fkonrad%2Ftwig.git added more information to an exception to ease debugging --- diff --git a/lib/Twig/Parser.php b/lib/Twig/Parser.php index acc17e6..8ae97cd 100644 --- a/lib/Twig/Parser.php +++ b/lib/Twig/Parser.php @@ -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()); } } }