diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-06-19 21:15:01 -0400 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-10-10 01:35:59 -0300 |
commit | 2ca83c4a83fffd5ed0bd4d9310eb2682170ff2f2 (patch) | |
tree | e389927ef583a3407ee962064b47cbedbf7ebff3 | |
parent | b3d41eae4b138d6c9d38bd9c1cbe033802c0e21d (diff) | |
download | rails-2ca83c4a83fffd5ed0bd4d9310eb2682170ff2f2.tar.gz rails-2ca83c4a83fffd5ed0bd4d9310eb2682170ff2f2.tar.bz2 rails-2ca83c4a83fffd5ed0bd4d9310eb2682170ff2f2.zip |
Remove deprecated code in ActionDispatch::Session::SessionRestoreError
-rw-r--r-- | actionpack/CHANGELOG.md | 9 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/session/abstract_store.rb | 12 |
2 files changed, 10 insertions, 11 deletions
diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md index d6652eaf9f..81b3ed551f 100644 --- a/actionpack/CHANGELOG.md +++ b/actionpack/CHANGELOG.md @@ -1,3 +1,12 @@ +* Remove deprecated `const_error` argument in + `ActionDispatch::Session::SessionRestoreError#initialize`. + + *Rafael Mendonça França* + +* Remove deprecated `#original_exception` in `ActionDispatch::Session::SessionRestoreError`. + + *Rafael Mendonça França* + * Deprecate `ActionDispatch::ParamsParser::ParseError` in favor of `ActionDispatch::Http::Parameters::ParseError`. diff --git a/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb b/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb index 60920ea6c8..49b82e7128 100644 --- a/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb +++ b/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb @@ -7,22 +7,12 @@ require "action_dispatch/request/session" module ActionDispatch module Session class SessionRestoreError < StandardError #:nodoc: - def initialize(const_error = nil) - if const_error - ActiveSupport::Deprecation.warn("Passing #original_exception is deprecated and has no effect. " \ - "Exceptions will automatically capture the original exception.", caller) - end - + def initialize super("Session contains objects whose class definition isn't available.\n" + "Remember to require the classes for all objects kept in the session.\n" + "(Original exception: #{$!.message} [#{$!.class}])\n") set_backtrace $!.backtrace end - - def original_exception - ActiveSupport::Deprecation.warn("#original_exception is deprecated. Use #cause instead.", caller) - cause - end end module Compatibility |