Sha256: 63dd9d79d8e1e9d80f6b67a9f81cbd462f605af5fa0cf926d11bdde5754e909c

Contents?: true

Size: 516 Bytes

Versions: 11

Compression:

Stored size: 516 Bytes

Contents

require 'honeybadger/plugin'

module Honeybadger
  Plugin.register do
    requirement { defined?(::SuckerPunch) }

    execution do
      if SuckerPunch.respond_to?(:exception_handler=) # >= v2
        SuckerPunch.exception_handler = ->(ex, klass, args) { Honeybadger.notify(ex, { :component => klass, :parameters => args }) }
      else
        SuckerPunch.exception_handler do |ex, klass, args|
          Honeybadger.notify(ex, { :component => klass, :parameters => args })
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
honeybadger-2.7.2 lib/honeybadger/plugins/sucker_punch.rb
honeybadger-2.7.1 lib/honeybadger/plugins/sucker_punch.rb
honeybadger-2.7.0 lib/honeybadger/plugins/sucker_punch.rb
honeybadger-2.6.1 lib/honeybadger/plugins/sucker_punch.rb
honeybadger-2.6.0 lib/honeybadger/plugins/sucker_punch.rb
honeybadger-2.5.3 lib/honeybadger/plugins/sucker_punch.rb
honeybadger-2.5.2 lib/honeybadger/plugins/sucker_punch.rb
honeybadger-2.5.1 lib/honeybadger/plugins/sucker_punch.rb
honeybadger-2.5.0 lib/honeybadger/plugins/sucker_punch.rb
honeybadger-2.4.1 lib/honeybadger/plugins/sucker_punch.rb
honeybadger-2.4.0 lib/honeybadger/plugins/sucker_punch.rb