diff options
author | José Valim <jose.valim@gmail.com> | 2011-12-01 20:16:12 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-12-01 20:16:12 +0100 |
commit | 956ecff8337908d7c3908977a5c8e12296a5b576 (patch) | |
tree | b28c8be5f8384075916e08c4d820466f7c32fe9e /actionpack/lib/action_dispatch/middleware | |
parent | 0b677b18ff75cd4bf8fd0b2f9579cd84ca3dc2b1 (diff) | |
download | rails-956ecff8337908d7c3908977a5c8e12296a5b576.tar.gz rails-956ecff8337908d7c3908977a5c8e12296a5b576.tar.bz2 rails-956ecff8337908d7c3908977a5c8e12296a5b576.zip |
Add a deprecation to old show exceptions API (even though it was not public).
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/show_exceptions.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/show_exceptions.rb b/actionpack/lib/action_dispatch/middleware/show_exceptions.rb index d5ed89ee9f..aa7a5e4d64 100644 --- a/actionpack/lib/action_dispatch/middleware/show_exceptions.rb +++ b/actionpack/lib/action_dispatch/middleware/show_exceptions.rb @@ -15,6 +15,20 @@ module ActionDispatch "application's log file and/or the web server's log file to find out what " << "went wrong.</body></html>"]] + class << self + def rescue_responses + ActiveSupport::Deprecation.warn "ActionDispatch::ShowExceptions.rescue_responses is deprecated. " \ + "Please configure your exceptions using a railtie or in your application config instead." + ExceptionWrapper.rescue_responses + end + + def rescue_templates + ActiveSupport::Deprecation.warn "ActionDispatch::ShowExceptions.rescue_templates is deprecated. " \ + "Please configure your exceptions using a railtie or in your application config instead." + ExceptionWrapper.rescue_templates + end + end + def initialize(app, consider_all_requests_local = nil) ActiveSupport::Deprecation.warn "Passing consider_all_requests_local option to ActionDispatch::ShowExceptions middleware no longer works" unless consider_all_requests_local.nil? @app = app |