charliesome/better_errors — pull request #104 by loopj (2013-01-29 04:49:51+00:00)
Title: Insert BetterErrors rack middleware after ActionDispatch::ShowExceptions in the railtie

Insert `BetterErrors::Middleware` Rack middleware after `ActionDispatch::ShowExceptions` in the Rails railtie.

There are multiple reasons for moving the middleware position:
- Better Errors will work even for exceptions thrown from rack middlewares (actiondispatch etc)
- Other error monitoring services (eg. [Bugsnag](https://bugsnag.com)) will still be called before showing the Better Errors page
- Being a good Rack citizen ;)

This change should be backward compatible.