Module: Opbeat::Rails::Middleware::DebugExceptionsCatcher
- Defined in:
- lib/opbeat/rails/middleware/debug_exceptions_catcher.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
5 6 7 |
# File 'lib/opbeat/rails/middleware/debug_exceptions_catcher.rb', line 5 def self.included(base) base.send(:alias_method_chain, :render_exception, :raven) end |
Instance Method Details
#render_exception_with_raven(env, exception) ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/opbeat/rails/middleware/debug_exceptions_catcher.rb', line 9 def render_exception_with_raven(env, exception) begin evt = Opbeat::Event.capture_rack_exception(exception, env) Opbeat.send(evt) if evt rescue ::Rails::logger.debug "Error capturing or sending exception #{$!}" end render_exception_without_raven(env, exception) end |