Sha256: 32fbe420ff33b8a0cf2d83a77ccce2ad5f44e57093ac302e21e5c148bfb64239

Contents?: true

Size: 1.02 KB

Versions: 34

Compression:

Stored size: 1.02 KB

Contents

module Rollbar
  module Middleware
    module Rails
      module ShowExceptions
        include ExceptionReporter

        def render_exception_with_rollbar(env, exception)
          key = 'action_dispatch.show_detailed_exceptions'
          
          # don't report production exceptions here as it is done below
          # in call_with_rollbar() when show_detailed_exception is false
          if not env.has_key?(key) or env[key]
            report_exception_to_rollbar(env, exception)
          end
          render_exception_without_rollbar(env, exception)
        end
        
        def call_with_rollbar(env)
          call_without_rollbar(env)
        rescue => exception
          # won't reach here if show_detailed_exceptions is true
          report_exception_to_rollbar(env, exception)
          raise exception
        end

        def self.included(base)
          base.send(:alias_method_chain, :call, :rollbar)
          base.send(:alias_method_chain, :render_exception, :rollbar)
        end
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
rollbar-0.12.13 lib/rollbar/middleware/rails/show_exceptions.rb
rollbar-0.12.12 lib/rollbar/middleware/rails/show_exceptions.rb
rollbar-0.12.11 lib/rollbar/middleware/rails/show_exceptions.rb
rollbar-0.12.10 lib/rollbar/middleware/rails/show_exceptions.rb
rollbar-0.12.9 lib/rollbar/middleware/rails/show_exceptions.rb
rollbar-0.12.8 lib/rollbar/middleware/rails/show_exceptions.rb
rollbar-0.12.7 lib/rollbar/middleware/rails/show_exceptions.rb
rollbar-0.12.6 lib/rollbar/middleware/rails/show_exceptions.rb
rollbar-0.12.5 lib/rollbar/middleware/rails/show_exceptions.rb
rollbar-0.12.3 lib/rollbar/middleware/rails/show_exceptions.rb
rollbar-0.12.2 lib/rollbar/middleware/rails/show_exceptions.rb
rollbar-0.12.1 lib/rollbar/middleware/rails/show_exceptions.rb
rollbar-0.12.0 lib/rollbar/middleware/rails/show_exceptions.rb
rollbar-0.11.8 lib/rollbar/middleware/rails/show_exceptions.rb
rollbar-0.11.7 lib/rollbar/middleware/rails/show_exceptions.rb
rollbar-0.11.6 lib/rollbar/middleware/rails/show_exceptions.rb
rollbar-0.11.5 lib/rollbar/middleware/rails/show_exceptions.rb
rollbar-0.11.4 lib/rollbar/middleware/rails/show_exceptions.rb
rollbar-0.11.3 lib/rollbar/middleware/rails/show_exceptions.rb
rollbar-0.11.2 lib/rollbar/middleware/rails/show_exceptions.rb