1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Raise LoadErrors separately

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@510 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson 2005-01-25 18:35:16 +00:00
parent be80d460f7
commit 11611c1b00
2 changed files with 4 additions and 2 deletions

View file

@ -96,7 +96,7 @@ module ActionController #:nodoc:
inherited_without_helper(child)
begin
child.helper(child.controller_name)
rescue Object
rescue NameError, LoadError
# No default helper available for this controller
end
end

View file

@ -18,8 +18,10 @@ module Dependencies
loaded << file_name
begin
require_or_load(file_name)
rescue LoadError
raise unless swallow_load_errors
rescue Object => e
raise ScriptError, "#{e.message}" unless e.is_a?(LoadError) && swallow_load_errors
raise ScriptError, "#{e.message}"
end
end
end