Class: Superbolt::ErrorNotifier::Airbrake
- Inherits:
-
Object
- Object
- Superbolt::ErrorNotifier::Airbrake
- Defined in:
- lib/superbolt/error_notifier/airbrake.rb
Instance Method Summary collapse
- #error!(exception, superbolt_message = nil) ⇒ Object
-
#initialize(logger) ⇒ Airbrake
constructor
A new instance of Airbrake.
Constructor Details
#initialize(logger) ⇒ Airbrake
Returns a new instance of Airbrake.
4 5 6 |
# File 'lib/superbolt/error_notifier/airbrake.rb', line 4 def initialize(logger) @logger = logger end |
Instance Method Details
#error!(exception, superbolt_message = nil) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/superbolt/error_notifier/airbrake.rb', line 8 def error!(exception, = nil) if defined? ::Airbrake ::Airbrake.notify_or_ignore(exception, parameters: ) else @logger.warn("You have configured Superbolt to send errors to Airbrake, but Airbrake is not available or is not configured!") end end |