Exception: ActionDispatch::Session::SessionRestoreError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/action_dispatch/middleware/session/abstract_store.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(const_error = nil) ⇒ SessionRestoreError

Returns a new instance of SessionRestoreError.



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/action_dispatch/middleware/session/abstract_store.rb', line 11

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

  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

Instance Method Details

#original_exceptionObject



23
24
25
26
# File 'lib/action_dispatch/middleware/session/abstract_store.rb', line 23

def original_exception
  ActiveSupport::Deprecation.warn("#original_exception is deprecated. Use #cause instead.", caller)
  cause
end