parent = false; $this->blocks = array(); $this->filename = $filename; } protected function doDisplay(array $context, array $blocks = array()) { // line 2 throw new \Exception('Foobar'); } public function getTemplateName() { return 'foo.twig'; } public function getDebugInfo() { return array(21 => 2); } public function getSourceContext() { return new Twig_Source(" foo bar\n twig source\n\n", 'foo.twig', false === $this->filename ? null : ($this->filename ?: 'bar.twig')); } }