Sha256: 1c4c8e85b7406927d162c6a7761ef5b0021e3f0db0151b19208de5c72597fd29

Contents?: true

Size: 574 Bytes

Versions: 91

Compression:

Stored size: 574 Bytes

Contents

require 'sucker_punch'

module Datadog
  module Contrib
    module SuckerPunch
      # Patches `sucker_punch` exception handling
      module ExceptionHandler
        METHOD = ->(e, *) { raise(e) }

        module_function

        def patch!
          ::SuckerPunch.class_eval do
            class << self
              alias_method :__exception_handler, :exception_handler

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

Version data entries

91 entries across 91 versions & 2 rubygems

Version Path
ddtrace-0.12.0.beta2 lib/ddtrace/contrib/sucker_punch/exception_handler.rb
ddtrace-0.12.0.beta1 lib/ddtrace/contrib/sucker_punch/exception_handler.rb
ddtrace-0.11.2 lib/ddtrace/contrib/sucker_punch/exception_handler.rb
ddtrace-0.11.1 lib/ddtrace/contrib/sucker_punch/exception_handler.rb
ddtrace-0.11.0 lib/ddtrace/contrib/sucker_punch/exception_handler.rb
ddtrace-0.11.0.beta2 lib/ddtrace/contrib/sucker_punch/exception_handler.rb
ddtrace-0.11.0.beta1 lib/ddtrace/contrib/sucker_punch/exception_handler.rb
ddtrace-0.10.0 lib/ddtrace/contrib/sucker_punch/exception_handler.rb
ddtrace-0.9.2 lib/ddtrace/contrib/sucker_punch/exception_handler.rb
ddtrace-0.9.1 lib/ddtrace/contrib/sucker_punch/exception_handler.rb
ddtrace-0.9.0 lib/ddtrace/contrib/sucker_punch/exception_handler.rb