fabpot/Twig — Issue #548: twig: exception_controller not called when Kernel debug off?
Author: advancingu
Created: 2011-12-03 07:18:21+00:00
State: open

For a Symfony2 project, I followed the FOSRestBundle documentation to register the FOSRestBundle's default exception controller for Twig as follows:
```yaml
twig:
exception_controller: 'FOS\RestBundle\Controller\ExceptionController::showAction'
```

Everything works fine and the exception controller is being called while the debug parameter of my Kernel is set to true. When it is set to off however, the controller is no longer called and all I get is error code 500. In fact, I can even register a non-existent exception_controller for Twig in my configuration when debug is off and there are no complaints about missing resources by Symfony.

Twig version being used is 396435ecd05556adb0a8bd05b14641cb4f8a8aa5, symfony version is symfony/symfony@b55a43813e8fbcf4facd19ce1da0cd7acc67ce9b .

Could this be a bug in Twig or Symfony?