getsentry/raven-ruby — pull request #192 by greysteil (2014-07-09 16:06:28+00:00)
Title: Add configuration option to catch debugged exceptions (or not)

We use Rails, and use a custom `exceptions_app` to catch a number of exceptions and serve non-5xx responses (it's quite a standard flow, and even has a [RailsCast](http://railscasts.com/episodes/53-handling-exceptions-revised)). We don't want the exceptions that are rescued by our exceptions app to be sent to Sentry, but we do want to (manually) send any exceptions that aren't handled over.

This PR adds a `catch_debugged_exceptions` configuration option that suppresses inclusion of the `DebugExceptionsCatcher` class if set to `false`. That means exceptions that reach the exceptions app aren't automatically sent, but allows us the flexibility to send those exceptions if they aren't handled (previously our solution had been to use the `excluded_exceptions` config, which precluded that).