module ErrorappNotifier::ActionControllerMethods
Public Instance Methods
errorapp_rescue(context=nil, &block)
click to toggle source
# 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)
click to toggle source
# 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
Private Instance Methods
exception_handled_by_rescue_from?(exception)
click to toggle source
# File lib/errorapp_notifier/action_controller_methods.rb, line 31 def exception_handled_by_rescue_from?(exception) respond_to?(:handler_for_rescue) && handler_for_rescue(exception) end
notify_with_controller(exception)
click to toggle source
# File lib/errorapp_notifier/action_controller_methods.rb, line 23 def notify_with_controller(exception) ErrorappNotifier::Notify.notify_with_controller( exception, self, request ) end