Skip to content
This repository
Browse code

Add a deprecation to old show exceptions API (even though it was not …

…public).
  • Loading branch information...
commit 956ecff8337908d7c3908977a5c8e12296a5b576 1 parent 0b677b1
José Valim josevalim authored
14 actionpack/lib/action_dispatch/middleware/show_exceptions.rb
@@ -15,6 +15,20 @@ class ShowExceptions
15 15 "application's log file and/or the web server's log file to find out what " <<
16 16 "went wrong.</body></html>"]]
17 17
  18 + class << self
  19 + def rescue_responses
  20 + ActiveSupport::Deprecation.warn "ActionDispatch::ShowExceptions.rescue_responses is deprecated. " \
  21 + "Please configure your exceptions using a railtie or in your application config instead."
  22 + ExceptionWrapper.rescue_responses
  23 + end
  24 +
  25 + def rescue_templates
  26 + ActiveSupport::Deprecation.warn "ActionDispatch::ShowExceptions.rescue_templates is deprecated. " \
  27 + "Please configure your exceptions using a railtie or in your application config instead."
  28 + ExceptionWrapper.rescue_templates
  29 + end
  30 + end
  31 +
18 32 def initialize(app, consider_all_requests_local = nil)
19 33 ActiveSupport::Deprecation.warn "Passing consider_all_requests_local option to ActionDispatch::ShowExceptions middleware no longer works" unless consider_all_requests_local.nil?
20 34 @app = app

0 comments on commit 956ecff

Please sign in to comment.
Something went wrong with that request. Please try again.