[ZODB-Dev] RE: [Zope-Annce] ZODB 3.2.4 release candidate 1
released
Dieter Maurer
dieter at handshake.de
Wed Sep 8 15:00:49 EDT 2004
Florent Guillaume wrote at 2004-9-8 00:35 +0200:
>Actually the ones I'm thinking about have been added to code that originally did:
> try:
> ...stuff...
> except:
> LOG('an error happened: %s' % sys.exc_info())
> # continue anyway as we "shouldn't fail"
> # or we "want to return a default value if we fail"
> ...rest...
>
>This happened for instance in manage_beforeDelete,...
It is bad to catch any exception in "manage_beforeDelete"
as it can lead to an inconsistent ZODB state.
"manage_beforeDelete" is likely to change some persistent state
(catalog usually). If something goes wrong inside "manage_beforeDelete"
and the exception is catched, persistent state is likely to be
inconsistent.
--
Dieter
More information about the ZODB-Dev
mailing list