Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

airbrake-ruby: don't report unhandled exceptions #61

Merged
merged 1 commit into from
Mar 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions 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](https:/airbrake/airbrake/pull/526) instead
([#61](https:/airbrake/airbrake-ruby/pull/61))
* Started filtering the context payload
([#55](https:/airbrake/airbrake-ruby/pull/55))
* Fixed bug when similar keys would be filtered out using non-regexp values for
Expand Down Expand Up @@ -74,7 +77,6 @@ Airbrake Ruby Changelog

* Initial release

[airbrake-gem]: https:/airbrake/airbrake
[v1.0.0.rc.1]: https:/airbrake/airbrake-ruby/releases/tag/v1.0.0.rc.1
[v1.0.0]: https:/airbrake/airbrake-ruby/releases/tag/v1.0.0
[v1.0.1]: https:/airbrake/airbrake-ruby/releases/tag/v1.0.1
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