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

Ticket #680 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

[PATCH] Gives Rescues some Love

Reported by: ulysses Assigned to: ulysses
Priority: high Milestone:
Component: ActiveSupport Version: 0.9.5
Severity: normal Keywords: 500 error rescues
Cc: David

Description

For a while Rescues has been in need of some love. Finding errors inside of loaded files is sometimes infuriating, especially when the exception messages sometimes point you in a totally incorrect direction.

In addition, the introduction of Routes has lead to 500 errors when Routes failed to load a controller -- such as when the controller's source file had syntax errors.

This patch fixes both of these issues. Exceptions which are thrown from inside a file now obtain a blamed_files -- this list is shown on the standard diagnostics page. (Provided that it is non-empty.)

The second issue is frequently seen as a nil has no method capitalize error, and is now resolved as well.

I've given this patch a high priority due to the 500 errors it fixes.

Attachments

load_failure_tracing.patch (4.2 kB) - added by Ulysses on 02/20/05 05:53:54.
Adds tracing of load failures and fixes some 500 errors

Change History

02/20/05 05:53:54 changed by Ulysses

  • attachment load_failure_tracing.patch added.

Adds tracing of load failures and fixes some 500 errors

02/20/05 05:56:36 changed by ulysses

To DHH:

This will cause a conflict when you try to merge this with the changes to the loading module. To fix this conflict, wrap the contents of the new load_file! with

begin
  ... contents here
rescue Object => exception
  exception.blame_file! file_path
  raise
end

02/20/05 10:51:21 changed by david

  • status changed from new to closed.
  • resolution set to fixed.