Skip to content

Commit

Permalink
airbrake-ruby: don't report unhandled exceptions
Browse files Browse the repository at this point in the history
Fixes #58 (Configuration setting for unhandled exceptions)

Although we delete this, it is still useful. Therefore, this
functionality is going to be moved to the Airbrake gem instead.
  • Loading branch information
kyrylo committed Mar 11, 2016
1 parent dbb84d8 commit 8e87173
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ Airbrake Ruby Changelog
c.whitelist_keys = [:page_id, 'user']
end
```

* **IMPORTANT**: dropped support for reporting critical exceptions that
terminate the process. This bit of functionality was moved to the
[airbrake gem][airbrake-gem] instead
([#??](https://github.com/airbrake/airbrake-ruby/pull/??))
* Started filtering the context payload
([#55](https://github.com/airbrake/airbrake-ruby/pull/55))
* Fixed bug when similar keys would be filtered out using non-regexp values for
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,19 @@ In order to run benchmarks against `master`, add the `lib` directory to your
ruby -Ilib benchmarks/notify_async_vs_sync.rb
```

### Reporting critical exceptions

Critical exceptions are unhandled exceptions that terminate your program. By
default, the library doesn't report them. However, you can either depend on the
[airbrake gem][airbrake-gem] instead, which supports them, or you can add
the following code somewhere in your app:

```ruby
at_exit do
Airbrake.notify_sync($!) if $!
end
```

Supported Rubies
----------------

Expand Down
6 changes: 0 additions & 6 deletions lib/airbrake-ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
require 'json'
require 'thread'
require 'set'
require 'English'
require 'socket'

require 'airbrake-ruby/version'
Expand Down Expand Up @@ -293,8 +292,3 @@ def call_notifier(notifier, method, *args, &block)
end
end
end

# Notify of unhandled exceptions, if there were any, but ignore SystemExit.
at_exit do
Airbrake.notify_sync($ERROR_INFO) if $ERROR_INFO
end

0 comments on commit 8e87173

Please sign in to comment.