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