diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/CHANGELOG | 2 | ||||
-rw-r--r-- | railties/lib/dispatcher.rb | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG index d1cd3c9d6f..e8d84df447 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Make sure that exceptions which are thrown outside of the user code try their best to be handeled in ApplicationController#rescue_action [Tobias Luetke] + * Rails::VERSION::STRING should always be available without having to require 'rails/version'. #6244 [fearoffish] * Update to Prototype 1.5.0_rc2. [Sam Stephenson] diff --git a/railties/lib/dispatcher.rb b/railties/lib/dispatcher.rb index be2f54a04c..1d604bc254 100644 --- a/railties/lib/dispatcher.rb +++ b/railties/lib/dispatcher.rb @@ -42,7 +42,8 @@ class Dispatcher end rescue Exception => exception # errors from CGI dispatch failsafe_response(output, '500 Internal Server Error', exception) do - controller ||= const_defined?(:ApplicationController) ? ApplicationController : ActionController::Base + controller ||= ApplicationController rescue LoadError nil + controller ||= ActionController::Base controller.process_with_exception(request, response, exception).out(output) end ensure |