Skip to content

Commit

Permalink
Add a deprecation to old show exceptions API (even though it was not …
Browse files Browse the repository at this point in the history
…public).
  • Loading branch information
josevalim committed Dec 1, 2011
1 parent 0b677b1 commit 956ecff
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions actionpack/lib/action_dispatch/middleware/show_exceptions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,20 @@ class ShowExceptions
"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
Expand Down

0 comments on commit 956ecff

Please sign in to comment.