[Zope] Trying to trap ConflictError

Andreas Jung lists at zopyx.com
Tue Jul 4 13:05:32 EDT 2006



--On 4. Juli 2006 12:58:24 -0400 Jonathan <dev101 at magma.ca> wrote:

>
> ----- Original Message ----- From: "Stefan H. Holek" <stefan at epy.co.at>
> To: "Jonathan" <dev101 at magma.ca>
> Cc: <zope at zope.org>
> Sent: Tuesday, July 04, 2006 11:02 AM
> Subject: Re: [Zope] Trying to trap ConflictError
>
>
>> First, you should not - ever - catch a ConflictError. It is essential
>> for  ConflictErrors to be propagated to the ZPublisher.
>
> This seems to be an extremely 'user-unfriendly' approach.
>
> In my use case the error is being generated when an image object is being
> written to a temporary folder. If, for any reason, the image object is
> not able to be stored it would seem prudent to be able to handle this
> condition within the application software.

If you catch ConflictError then you have to perform conflict resolution on 
your own. But as Stefan wrote: you should *never* swallow ConflictErrors. I 
thionk there are one or two ZODB article available from zope.org explaining 
how to implement conflict resolution properly.

-aj

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20060704/748a5124/attachment.bin


More information about the Zope mailing list