class Superbolt::ErrorNotifier::Airbrake
Public Class Methods
new(logger)
click to toggle source
# File lib/superbolt/error_notifier/airbrake.rb, line 4 def initialize(logger) @logger = logger end
Public Instance Methods
error!(exception, superbolt_message = nil)
click to toggle source
# File lib/superbolt/error_notifier/airbrake.rb, line 8 def error!(exception, superbolt_message = nil) if defined? ::Airbrake ::Airbrake.notify_or_ignore(exception, parameters: superbolt_message) else @logger.warn("You have configured Superbolt to send errors to Airbrake, but Airbrake is not available or is not configured!") end end