Module: ExceptionHandling::EscalateCallback

Defined in:
lib/exception_handling/escalate_callback.rb

Class Method Summary collapse

Class Method Details

.register!Object



12
13
14
15
16
# File 'lib/exception_handling/escalate_callback.rb', line 12

def register!
  Escalate.on_escalate(log_first: false) do |exception, location_message, **context|
    ::ExceptionHandling.log_error(exception, location_message, **context)
  end
end

.register_if_configured!Object



8
9
10
# File 'lib/exception_handling/escalate_callback.rb', line 8

def register_if_configured!
  register! if ::ExceptionHandling.configured?
end