diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-01-20 15:29:11 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-01-20 15:29:11 +0000 |
commit | 99598820cf662ece0e2e97cc2ef07da3da6ea9f9 (patch) | |
tree | 311e8729f023a8f696c7758dc439ff3c5ea0b40c /railties/lib | |
parent | 79d7e66f785f92e993343e2499bf3156b4fac722 (diff) | |
download | rails-99598820cf662ece0e2e97cc2ef07da3da6ea9f9.tar.gz rails-99598820cf662ece0e2e97cc2ef07da3da6ea9f9.tar.bz2 rails-99598820cf662ece0e2e97cc2ef07da3da6ea9f9.zip |
Fixed that FCGI can also display SyntaxErrors
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@470 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/dispatcher.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/railties/lib/dispatcher.rb b/railties/lib/dispatcher.rb index eed6db574f..2cbc42eaff 100644 --- a/railties/lib/dispatcher.rb +++ b/railties/lib/dispatcher.rb @@ -48,9 +48,13 @@ class Dispatcher private def reset_application(controller_name) - ActiveRecord::Base.reset_column_information_and_inheritable_attributes_for_all_subclasses - Dependencies.clear - remove_class_hierarchy(controller_class(controller_name), ActionController::Base) + begin + ActiveRecord::Base.reset_column_information_and_inheritable_attributes_for_all_subclasses + Dependencies.clear + remove_class_hierarchy(controller_class(controller_name), ActionController::Base) + rescue Object => exception + # Compilation errors are caught on the first run through + end end def controller_path(controller_name, module_name = nil) |