[Zope3-dev] zope.rdb error and zope.publisher error

Brian Sutherland jinty at web.de
Wed Apr 25 16:48:00 EDT 2007


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


More information about the Zope3-dev mailing list