diff -r 000000000000 -r 7f95f8617b0b vendor/symfony/src/Symfony/Bundle/WebProfilerBundle/Controller/ExceptionController.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vendor/symfony/src/Symfony/Bundle/WebProfilerBundle/Controller/ExceptionController.php Sat Sep 24 15:40:41 2011 +0200 @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\WebProfilerBundle\Controller; + +use Symfony\Component\DependencyInjection\ContainerAware; +use Symfony\Component\HttpKernel\Exception\FlattenException; +use Symfony\Component\HttpKernel\Log\DebugLoggerInterface; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Bundle\TwigBundle\Controller\ExceptionController as BaseExceptionController; + +/** + * ExceptionController. + * + * @author Fabien Potencier + */ +class ExceptionController extends BaseExceptionController +{ + /** + * {@inheritdoc} + */ + public function showAction(FlattenException $exception, DebugLoggerInterface $logger = null, $format = 'html') + { + $template = $this->container->get('kernel')->isDebug() ? 'exception' : 'error'; + $code = $exception->getStatusCode(); + + return $this->container->get('templating')->renderResponse( + 'TwigBundle:Exception:'.$template.'.html.twig', + array( + 'status_code' => $code, + 'status_text' => Response::$statusTexts[$code], + 'exception' => $exception, + 'logger' => null, + 'currentContent' => '', + ) + ); + } +}