Accordingly to this doc page:
http://symfony.com/doc/current/cookbook/controller/error_pages.html
Symfony uses the TwigBundle to control the display of exceptions. However, i'm not looking to customize the display, as mentioned in the doc, i'm looking to override this. I'm working on a small REST API and i wanted to override the calling of TwigBundle to my bundle, making my own exceptions handling (in terms of REST: map correct HTTP status codes and plain-text body responses).
I couldn't find anything about this and the reference on the manual is not that good, specially on the kernel part. Maybe someone already did this and can help me out? Thanks.