[Zope] get_transaction().commit() exceptions

Chris Withers chris at simplistix.co.uk
Thu Sep 2 04:46:39 EDT 2004


Tim Edwards wrote:

> 
> A seperate thread checks the email server and saves new tickets (emails) to
> the ZODB. This mail-checking thread somtimes gets ConflictError at the call
> to get_transaction().commit(). This exception goes unhandled and the
> mail-checking thread dies. This means that the product will still work - it
> just won't retreive any email messages.
> 
> Is it a good idea to try and catch this exception? 

Yes, but only if you know what you're doing ;-)

> If so what should we do
> with it? will catching it stop the mail-checking thread from dying?

Yes, but you need to be careful what you do with it. It requries an 
understanding of what that exception means and how to safely recover 
from it. Please ask on zodb-dev at zope.org where people with more 
knowledge than I can help out...

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk


More information about the Zope mailing list