NancyFx/Nancy — pull request #398 by nicolasgarfinkiel (2011-11-09 20:08:18+00:00)
Title: Refactored error handling process

The OnErrorHook and error handling process doesn't let the request lifecycle to flow properly. The following things were fixed:

- If an error occurs, the recorded exception details only show a limited stack trace.
- If an error occurs while processing a route, the post request hooks are never fired.
- Removed dependency on ERROR_KEY context item to record exception details. Added an Exception property to NancyContext
- Removed Error pipeline altogether. Instead of that, users can add a regular post-request hook from which they have access to the Exception property and its details from the context, and manipulate the response as needed.

The main aim of this changes is to allow post-request hooks that perform clean-up tasks to execute, disregarding the result of the route processing.