parent = false; $this->blocks = []; $this->path = $path; } protected function doDisplay(array $context, array $blocks = []) { // line 2 throw new \Exception('Foobar'); } public function getTemplateName() { return 'foo.twig'; } public function getDebugInfo() { return [20 => 1, 21 => 2]; } public function getSourceContext() { return new Twig\Source(" foo bar\n twig source\n\n", 'foo.twig', $this->path ?: __FILE__); } }