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

Changeset 510

Show
Ignore:
Timestamp:
01/25/05 18:35:16 (4 years ago)
Author:
david
Message:

Raise LoadErrors separately

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/lib/action_controller/helpers.rb

    r508 r510  
    9797          begin 
    9898            child.helper(child.controller_name) 
    99           rescue Object 
     99          rescue NameError, LoadError 
    100100            # No default helper available for this controller 
    101101          end 
  • trunk/activesupport/lib/dependencies.rb

    r509 r510  
    1919      begin 
    2020        require_or_load(file_name) 
     21      rescue LoadError 
     22        raise unless swallow_load_errors 
    2123      rescue Object => e 
    22         raise ScriptError, "#{e.message}" unless e.is_a?(LoadError) && swallow_load_errors 
     24        raise ScriptError, "#{e.message}" 
    2325      end 
    2426    end