symfony/symfony — pull request #5036 by romainneutron (2012-07-24 15:44:59+00:00)
Title: [HttpKernel] HTTP kernel exception handling update

Bug fix: yes
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes [![Build Status](https://secure.travis-ci.org/romainneutron/symfony.png?branch=HttpKernelExceptionHandling)](http://travis-ci.org/romainneutron/symfony)
License of the code: MIT

Update to HttpKernel::handle, allow to specify exception handling mode

Introduce three way to handle errors :
- do not handle (throws exception)
- Handle and tune the response automatically (ensure an error response)
- Handle and return the response forged in a user defined exception handler

This last example allows a user to return a 200 response even if an exception has been thrown.