Sha256: bc17fbe3e072aaf56ab4d698acdbf718f508356fbdc4d773d5669b2cb53e76ce

Contents?: true

Size: 587 Bytes

Versions: 8

Compression:

Stored size: 587 Bytes

Contents

module Opbeat
  module Rails
    module Middleware
      module DebugExceptionsCatcher
        def self.included(base)
          base.send(:alias_method_chain, :render_exception, :opbeat)
        end

        def render_exception_with_opbeat(env, exception)
          begin
            evt = Opbeat::Event.from_rack_exception(exception, env)
            Opbeat.send(evt) if evt
          rescue
            ::Rails::logger.debug "Error capturing or sending exception #{$!}"
          end

          render_exception_without_opbeat(env, exception)
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
kuende-opbeat-2.0.4 lib/opbeat/rails/middleware/debug_exceptions_catcher.rb
kuende-opbeat-2.0.3 lib/opbeat/rails/middleware/debug_exceptions_catcher.rb
kuende-opbeat-2.0.2 lib/opbeat/rails/middleware/debug_exceptions_catcher.rb
kuende-opbeat-2.0.1 lib/opbeat/rails/middleware/debug_exceptions_catcher.rb
opbeat-2.0.0 lib/opbeat/rails/middleware/debug_exceptions_catcher.rb
opbeat-1.1.1 lib/opbeat/rails/middleware/debug_exceptions_catcher.rb
opbeat-1.1.0 lib/opbeat/rails/middleware/debug_exceptions_catcher.rb
opbeat-1.0.0 lib/opbeat/rails/middleware/debug_exceptions_catcher.rb