Module: Rollbar::Middleware::Rails::ShowExceptions

Includes:
ExceptionReporter
Defined in:
lib/rollbar/middleware/rails/show_exceptions.rb

Constant Summary

Constants included from RequestDataExtractor

RequestDataExtractor::ATTACHMENT_CLASSES

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ExceptionReporter

#report_exception_to_rollbar, #rollbar_debug

Methods included from RequestDataExtractor

#extract_person_data_from_controller, #extract_request_data_from_rack

Class Method Details

.included(base) ⇒ Object



19
20
21
22
# File 'lib/rollbar/middleware/rails/show_exceptions.rb', line 19

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

Instance Method Details

#call_with_rollbar(env) ⇒ Object



12
13
14
15
16
17
# File 'lib/rollbar/middleware/rails/show_exceptions.rb', line 12

def call_with_rollbar(env)
  call_without_rollbar(env)
rescue => exception
  report_exception_to_rollbar(env, exception)
  raise exception
end

#render_exception_with_rollbar(env, exception) ⇒ Object



7
8
9
10
# File 'lib/rollbar/middleware/rails/show_exceptions.rb', line 7

def render_exception_with_rollbar(env, exception)
  report_exception_to_rollbar(env, exception)
  render_exception_without_rollbar(env, exception)
end