bugsnag/bugsnag-ruby — pull request #23 by keithpitt (2013-02-28 00:24:34+00:00)
Title: Exceptions with meta data

In this pull request, I propose an additional method of adding custom data to exceptions.

```ruby
class MyCustomException < Exception
include Bugsnag::MetaData
end

exception = MyCustomException.new("It broke!")
exception.bugsnag_meta_data = {
:user_info => {
name: current_user.name
}
}

raise exception
```

The benefit of this, is that you use the `before_notify_callbacks` method for more global information (like current user), and above, you can use it for more specific things tied to a particular exception, such as the response from an API.