Skip to content

Commit

Permalink
[FrameworkBundle] partially reverted previous merge
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Jun 13, 2011
1 parent 459678a commit 33baf9d
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -75,21 +75,21 @@ protected function findTemplate($templating, $format, $code, $debug)

// when not in debug, try to find a template for the specific HTTP status code and format
if (!$debug) {
$template = sprintf('FrameworkBundle:Exception:%s%s.%s.twig', $name, $code, $format);
$template = new TemplateReference('FrameworkBundle', 'Exception', $name.$code, $format, 'twig');
if ($templating->exists($template)) {
return $template;
}
}

// try to find a template for the given format
$template = sprintf('FrameworkBundle:Exception:%s.%s.twig', $name, $format);
$template = new TemplateReference('FrameworkBundle', 'Exception', $name, $format, 'twig');
if ($templating->exists($template)) {
return $template;
}

// default to a generic HTML exception
$this->container->get('request')->setRequestFormat('html');

return sprintf('FrameworkBundle:Exception:%s.html.twig', $name);
return new TemplateReference('FrameworkBundle', 'Exception', $name, 'html', 'twig');
}
}

0 comments on commit 33baf9d

Please sign in to comment.