I have code that needs to maintain certain invariants when objects are deleted, these invariants are maintained in manage_beforeDelete.

Unfortunately manage_beforeDelete has this code:
try:
if hasattr(aq_base(object), 'manage_beforeDelete'):
object.manage_beforeDelete(item, container)
except BeforeDeleteException, ob:
raise
except:
LOG('Zope',ERROR,'manage_beforeDelete() threw',
error=sys.exc_info())
pass
Which means that ConflictErrors in my invariant code get swallowed, and my invariants are broken. This kills me.


I want to add an additionnal:
            except ConflictError:
                raise

Any objections ?

Florent

--
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:[EMAIL PROTECTED]


_______________________________________________
Zope-Dev maillist - [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Reply via email to