module Croket::Rails::ActionControllerCatcher
Constants
- KINDS
Public Class Methods
included(base)
click to toggle source
# File lib/croket/rails/action_controller_catcher.rb, line 13 def self.included(base) if base.method_defined?(:rescue_action_in_public) base.send(:alias_method, :rescue_action_in_public_without_croket, :rescue_action_in_public) base.send(:alias_method, :rescue_action_in_public, :rescue_action_in_public_with_croket) end end
Public Instance Methods
run_callbacks(kind, *args, &block)
click to toggle source
Calls superclass method
# File lib/croket/rails/action_controller_catcher.rb, line 22 def run_callbacks(kind, *args, &block) if KINDS.include?(kind) begin super rescue StandardError => exception # This exception will NOT be escalated, so notify it here. Croket.notify(exception, nil) raise end else # Let the post process handle the exception super end end
Private Instance Methods
rescue_action_in_public_with_hahulya(exception)
click to toggle source
Overrides the rescue_action method in ActionController::Base, but does not inhibit any custom processing that is defined with Rails
2’s exception helpers.
# File lib/croket/rails/action_controller_catcher.rb, line 41 def rescue_action_in_public_with_hahulya(exception) error_id = Croket.notify(exception, hahulya_request_data) end