webpy/webpy — pull request #229 by iamFIREcracker (2013-05-21 22:01:41+00:00)
Title: Enable exception handling inside application processors

Prior to this patch, to manage certain kind of exceptions not to send a '500 Internal Error' message back to the client, one had to subclass web.application and change the behaviour of the method ``handle_with_processors``.

The problem with the previous implementation was that each application processor and in turn the request handler were called inside a try-catch block: this way, exceptions thrown in the _real_ handler ended up being caught by the first try-catch block found traversing the stack (i.e. the one around the call to ``self.handle``).

With this patch only the call ``process(processors)`` has been surrounded by a try-catch block and consequently application processors are now free to manage raised exceptions.