Module: ErrorappNotifier::ActionControllerMethods
- Defined in:
- lib/errorapp_notifier/action_controller_methods.rb
Instance Method Summary collapse
Instance Method Details
#errorapp_rescue(context = nil, &block) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/errorapp_notifier/action_controller_methods.rb', line 10 def errorapp_rescue(context=nil, &block) begin ErrorappNotifier.context(context) unless context.nil? block.call rescue Exception => exception notify_with_controller(exception) ensure ErrorappNotifier.context.clear! end end |
#rescue_with_errorapp(exception) ⇒ Object
3 4 5 6 7 8 |
# File 'lib/errorapp_notifier/action_controller_methods.rb', line 3 def rescue_with_errorapp(exception) unless exception_handled_by_rescue_from?(exception) notify_with_controller(exception) ErrorappNotifier.context.clear! end end |