Browse files

swallow error when can't unmarshall object from session

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
1 parent 86a5271 commit 4d986c4a101a473ea83316931e316c7dbdfc531a @bzanchet bzanchet committed with josevalim Oct 11, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 actionpack/lib/action_dispatch/middleware/session/abstract_store.rb
View
3 actionpack/lib/action_dispatch/middleware/session/abstract_store.rb
@@ -62,6 +62,9 @@ def stale_session_check!
raise ActionDispatch::Session::SessionRestoreError, "Session contains objects whose class definition isn't available.\nRemember to require the classes for all objects kept in the session.\n(Original exception: #{const_error.message} [#{const_error.class}])\n"
end
retry
+ elsif argument_error.message =~ %r{dump format error \(user class\)}
+ # Error unmarshalling object from session.
+ {}
else
raise
end

0 comments on commit 4d986c4

Please sign in to comment.