From 11611c1b002243a766c86c374b812c61a5b672c7 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 25 Jan 2005 18:35:16 +0000 Subject: [PATCH] Raise LoadErrors separately git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@510 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/helpers.rb | 2 +- activesupport/lib/dependencies.rb | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/actionpack/lib/action_controller/helpers.rb b/actionpack/lib/action_controller/helpers.rb index eb2b4fa7ab..e664ab2856 100644 --- a/actionpack/lib/action_controller/helpers.rb +++ b/actionpack/lib/action_controller/helpers.rb @@ -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 diff --git a/activesupport/lib/dependencies.rb b/activesupport/lib/dependencies.rb index e5e806b65a..7f53998e7a 100644 --- a/activesupport/lib/dependencies.rb +++ b/activesupport/lib/dependencies.rb @@ -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