added missing debug info when using traits
authorFabien Potencier <fabien.potencier@gmail.com>
Sun, 5 Jun 2011 10:12:05 +0000 (12:12 +0200)
committerFabien Potencier <fabien.potencier@gmail.com>
Sun, 5 Jun 2011 10:12:05 +0000 (12:12 +0200)
lib/Twig/Node/Module.php

index 808cf6b..1af7622 100644 (file)
@@ -136,6 +136,7 @@ class Twig_Node_Module extends Twig_Node
                 $this->compileLoadTemplate($compiler, $trait->getNode('template'), sprintf('$_trait_%s', $i));
 
                 $compiler
+                    ->addDebugInfo($trait->getNode('template'))
                     ->write(sprintf("if (!\$_trait_%s->isTraitable()) {\n", $i))
                     ->indent()
                     ->write("throw new Twig_Error_Runtime('Template \"'.")