Sha256: 08c0bc778653bf8bc36eee110f8098cf70ac1bfecb1a78e2eeb3a8bcb4309198

Contents?: true

Size: 449 Bytes

Versions: 30

Compression:

Stored size: 449 Bytes

Contents

# frozen_string_literal: true

require 'escalate'

module ExceptionHandling
  module EscalateCallback
    class << self
      def register_if_configured!
        register! if ::ExceptionHandling.configured?
      end

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

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
exception_handling-3.1.1 lib/exception_handling/escalate_callback.rb
exception_handling-3.1.1.pre.tstarck.1 lib/exception_handling/escalate_callback.rb
exception_handling-3.1.0 lib/exception_handling/escalate_callback.rb
exception_handling-3.1.0.pre.3 lib/exception_handling/escalate_callback.rb
exception_handling-3.0.1 lib/exception_handling/escalate_callback.rb
exception_handling-3.1.0.pre.2 lib/exception_handling/escalate_callback.rb
exception_handling-3.1.0.pre.tstarck.2 lib/exception_handling/escalate_callback.rb
exception_handling-3.1.0.pre.tstarck.1 lib/exception_handling/escalate_callback.rb
exception_handling-3.0.0 lib/exception_handling/escalate_callback.rb
exception_handling-3.0.0.pre.2 lib/exception_handling/escalate_callback.rb
exception_handling-2.17.0.pre.tstarck.1 lib/exception_handling/escalate_callback.rb
exception_handling-2.16.0 lib/exception_handling/escalate_callback.rb
exception_handling-2.15.0 lib/exception_handling/escalate_callback.rb
exception_handling-2.14.0 lib/exception_handling/escalate_callback.rb
exception_handling-2.14.0.pre.gk.1 lib/exception_handling/escalate_callback.rb
exception_handling-2.14.0.pre.gk.0 lib/exception_handling/escalate_callback.rb
exception_handling-2.13.0 lib/exception_handling/escalate_callback.rb
exception_handling-2.13.0.pre.dc.0 lib/exception_handling/escalate_callback.rb
exception_handling-2.12.0 lib/exception_handling/escalate_callback.rb
exception_handling-2.12.0.gfaza.1 lib/exception_handling/escalate_callback.rb