Project

trouble

0.0
No commit activity in last 3 years
No release in over 3 years
A generic abstraction layer for reporting 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.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

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'