Module: CrashdeskRails::DebugExceptions
- Defined in:
- lib/crashdesk-rails/debug_exceptions.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#render_exception_with_crashdesk(env, exception) ⇒ Object
We are overriding this method as we don’t want to write our own middleware yet.
Class Method Details
.included(base) ⇒ Object
4 5 6 |
# File 'lib/crashdesk-rails/debug_exceptions.rb', line 4 def self.included(base) base.send(:alias_method_chain, :render_exception, :crashdesk) end |
Instance Method Details
#render_exception_with_crashdesk(env, exception) ⇒ Object
We are overriding this method as we don’t want to write our own middleware yet.
10 11 12 13 14 15 16 17 18 |
# File 'lib/crashdesk-rails/debug_exceptions.rb', line 10 def render_exception_with_crashdesk(env, exception) request = Rack::Request.new(env) context = ActionControllerContext.new(env['action_controller.instance'], request) crashlog = Crashdesk.crashlog(exception, request, context) crashlog.report render_exception_without_crashdesk(env, exception) end |