GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Raise LoadErrors separately

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@510 
5ecf4fe2-1ee6-0310-87b1-e25e094e27de
dhh (author)
Tue Jan 25 10:35:16 -0800 2005
commit  a1acffe78c690182b1b0c3bb46c5cfc41ea50205
tree    c7d9b38bc4df39e6f5d4ce3080acade92aed8b2d
parent  be80d460f7389d3b5db7248cc4fb726fa61db4e4
...
96
97
98
99
 
100
101
102
...
96
97
98
 
99
100
101
102
0
@@ -96,7 +96,7 @@ module ActionController #:nodoc:
0
           inherited_without_helper(child)
0
           begin
0
             child.helper(child.controller_name)
0
- rescue Object
0
+ rescue NameError, LoadError
0
             # No default helper available for this controller
0
           end
0
         end
...
18
19
20
 
 
21
22
 
23
24
25
...
18
19
20
21
22
23
 
24
25
26
27
0
@@ -18,8 +18,10 @@ module Dependencies
0
       loaded << file_name
0
       begin
0
         require_or_load(file_name)
0
+ rescue LoadError
0
+ raise unless swallow_load_errors
0
       rescue Object => e
0
- raise ScriptError, "#{e.message}" unless e.is_a?(LoadError) && swallow_load_errors
0
+ raise ScriptError, "#{e.message}"
0
       end
0
     end
0
   end

Comments

    No one has commented yet.