Exception handler called when the performance of an action raises an exception.
Source Code
# File action_controller/rescue.rb, line 112 def rescue_action(exception) log_error(exception) if logger erase_results if performed? # Let the exception alter the response if it wants. # For example, MethodNotAllowed sets the Allow header. if exception.respond_to?(:handle_response!) exception.handle_response!(response) end if consider_all_requests_local || local_request? rescue_action_locally(exception) else rescue_action_in_public(exception) end end
<code/>and<pre/>for code samples.