coderanger/raven-ruby — pull request #14 by noah256 (2012-07-02 21:11:24+00:00)
Title: Refactoring Raven::Event.capture_exception

It would be great to be able to Subclass Raven::Event to add custom
behavior for things like stack trace sanitization. Before we can do
that, it would be helpful to have smaller functions that to override. I
have split up Raven::Event.capture_exception to allow higher granularity
in overriding behaviour.

I also have added some limited specs to help ensure that the new
behavior matches the old. The only significant change in behaviour is
that before the refactor, passing an exception that did not have a
backtrace would raise an exception, which was making testing difficult
and prevented some types of logging (for instance, passing in an
exception that was constructed, rather than thrown). I added a guard
around the backtrace parsing to prevent this failure mode.