Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Rescue handlers should only run for non-local requests

#205

The new rescue_from declarative handlers run in every mode. Since they're usually pimped as a replacement for rescue_action_in_public, I think they should act accordingly (at least for now) and run only for non-local requests. The offending code in action_controller/rescue.rb:

def perform_action_with_rescue #:nodoc:
  perform_action_without_rescue
rescue Exception => exception
  rescue_action_with_handler(exception) || 
    rescue_action(exception)
end

A patch is attached to implement this behavior change.

Reported by David Yeu · May 15th, 2008 @ 10:57 PM

State: invalid
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Pratik
    Pratik
    • State changed from new to invalid

    It's very common to use rescue_from along with AR#save! method to render 'edit' or 'new' on validation failures, irrespective of dev/prod mode. And many similar use cases.

    May 16th, 2008 @ 12:44 PM