On Thu, Apr 26, 2007 at 02:53:54PM +0200, Maciej Wisniowski wrote:
> Possibly it is enough to change above code to something like:
>     try:
>         cursor.execute(query)
>     except Retry:
>         raise
>     except ConflictError:
>         raise
>     except Exception, error:
>         # Just catch the exception, so that we can convert it to a database
>         # exception.       
>         raise DatabaseException(str(error))
> Any thoughts?

I would personally be in favour of just ripping out DatabaseException
entirely and letting the original errors propagate. It's caused me a lot
of pain in the past by hiding real problems.

I have never seen any use for it.

Brian Sutherland
Zope3-dev mailing list
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to