Skip to content
A generic wrapper around Bugsnag and Co.
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
spec
.gitignore
.rspec
.travis.yml
Gemfile
Gemfile.lock
Guardfile
LICENSE
README.md
Rakefile
trouble.gemspec

README.md

Trouble

A unified wrapper to report errors and Exceptions.

This gem achieves independence of things like Bugsnag, Airbrake, etc.. If any of those is defined, Trouble will pass on the exception to them. Additionaly, everything is written to a custom logger you specify (defaults to Rails.logger).

Currently only Bugsnag is defined as a working backend.

Installation

gem install trouble

Usage

Syntax

Trouble.notify EXCEPTION, [METADATA-HASH]

Examples

exception = RuntimeError.new

Trouble.notify exception
Trouble.notify exception, some_idea_why_it_happened: "I don't know, but try this and that."

Rails Middleware

# config/application.rb
config.middleware.insert_after ActionDispatch::DebugExceptions, 'Trouble::Middleware'
Something went wrong with that request. Please try again.