[ZODB-Dev] ZODB4 - Why two inheritance branches for ConflictError ?

Jim Fulton jim@zope.com
Wed, 03 Jul 2002 08:48:32 -0400


Ury Marshak wrote:
> ZODB4 - Why two inheritance branches for ConflictError ?
> 
> While digging around in ZODB4 I accidently discovered that
> the class BTreesConflictError (in Persistence/BTrees/Exception.py)
> inherits from Transaction.Exceptions.ConflictError . What
> happens is that the code (including the ZODB itself) using the 
> 'from ZODB.POSException import ConflictError' line is unable to
> catch the Btrees exceptions, cause ZODB.POSException.ConflictError
> is also inheriting from Transaction.Exceptions.ConflictError. Is this
> the new inheritance model (meaning, do I have to catch exceptions
> by using 'except Transaction.Exceptions.ConflictError:' now?

This is clearly a bug. When the transaction frameworks
were split off from ZODB, the relevent exceptions should have gone with
them. We should move the transaction errors to Transaction.Exceptions.

Anybody with commit access wanna do this? :)

Jim

-- 
Jim Fulton           mailto:jim@zope.com       Python Powered!
CTO                  (888) 344-4332            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org