Commit fd8408e7 authored by Chris McDonough's avatar Chris McDonough

Added exception handler for conflict error in setstate (better error messages this way).

parent b7c0e6bf
...@@ -84,8 +84,8 @@ ...@@ -84,8 +84,8 @@
############################################################################## ##############################################################################
"""Database connection support """Database connection support
$Id: Connection.py,v 1.48 2001/03/28 20:55:39 jim Exp $""" $Id: Connection.py,v 1.49 2001/04/02 14:54:54 chrism Exp $"""
__version__='$Revision: 1.48 $'[11:-2] __version__='$Revision: 1.49 $'[11:-2]
from cPickleCache import PickleCache from cPickleCache import PickleCache
from POSException import ConflictError, ExportError from POSException import ConflictError, ExportError
...@@ -548,8 +548,9 @@ class Connection(ExportImport.ExportImport): ...@@ -548,8 +548,9 @@ class Connection(ExportImport.ExportImport):
get_transaction().register(self) get_transaction().register(self)
raise ConflictError(`oid`, `object.__class__`) raise ConflictError(`oid`, `object.__class__`)
except ConflictError:
raise
except: except:
t, v =sys.exc_info()[:2]
LOG('ZODB',ERROR, "Couldn't load state for %s" % `oid`, LOG('ZODB',ERROR, "Couldn't load state for %s" % `oid`,
error=sys.exc_info()) error=sys.exc_info())
raise raise
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment