Sha256: a0852b887e24c30f18f9497656efd2fe1932f9686e92cb2c556234a1124dbbcc

Contents?: true

Size: 672 Bytes

Versions: 6

Compression:

Stored size: 672 Bytes

Contents

module Errplane
  module Rails
    module Middleware
      module HijackRenderException
        def self.included(base)
          base.send(:alias_method_chain, :render_exception, :errplane)
        end

        def render_exception_with_errplane(env, e)
          controller = env["action_controller.instance"]
          Errplane.configuration.logger.info("Controller: #{controller}")
          Errplane.configuration.logger.info("Request Data: #{controller.try(:errplane_request_data)}")
          Errplane.transmit_unless_ignorable(e,  controller.try(:errplane_request_data))
          render_exception_without_errplane(env, e)
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
errplane-0.3.7 lib/errplane/rails/middleware/hijack_render_exception.rb
errplane-0.2.7 lib/errplane/rails/middleware/hijack_render_exception.rb
errplane-0.2.6 lib/errplane/rails/middleware/hijack_render_exception.rb
errplane-0.2.5 lib/errplane/rails/middleware/hijack_render_exception.rb
errplane-0.2.4 lib/errplane/rails/middleware/hijack_render_exception.rb
errplane-0.2.3 lib/errplane/rails/middleware/hijack_render_exception.rb