Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #9645: rescue_action_override_fix.diff

File rescue_action_override_fix.diff, 0.8 kB (added by norbert, 1 year ago)
  • actionpack/lib/action_controller/rescue.rb

    old new  
    8989        log_error(exception) if logger 
    9090        erase_results if performed? 
    9191 
    92         return if rescue_action_with_handler(exception) 
    93  
    9492        # Let the exception alter the response if it wants. 
    9593        # For example, MethodNotAllowed sets the Allow header. 
    9694        if exception.respond_to?(:handle_response!) 
     
    176174      def perform_action_with_rescue #:nodoc: 
    177175        perform_action_without_rescue 
    178176      rescue Exception => exception  # errors from action performed 
     177        return if rescue_action_with_handler(exception) 
     178         
    179179        rescue_action(exception) 
    180180      end 
    181181