Module: Datadog::Tracing::Contrib::SuckerPunch::ExceptionHandler

Defined in:
lib/datadog/tracing/contrib/sucker_punch/exception_handler.rb

Overview

Patches ‘sucker_punch` exception handling

Constant Summary collapse

METHOD =
->(e, *) { raise(e) }

Class Method Summary collapse

Class Method Details

.patch!Object



15
16
17
18
19
20
21
22
23
# File 'lib/datadog/tracing/contrib/sucker_punch/exception_handler.rb', line 15

def patch!
  ::SuckerPunch.singleton_class.class_eval do
    alias_method :__exception_handler, :exception_handler

    def exception_handler
      ::Datadog::Tracing::Contrib::SuckerPunch::ExceptionHandler::METHOD
    end
  end
end