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

2007-04-27 Thread Maciej Wisniowski
An interesting way that SQLObject tries to get around this issue is to have a module attribute on the database connection. So then the original DatabaseException from the dbapi module is always at conn.module.DatabaseException. But I'm not sure zope.rdb should try that. Indeed, very

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

2007-04-27 Thread Brian Sutherland
On Fri, Apr 27, 2007 at 02:02:35PM +0200, Maciej Wisniowski wrote: One problem with ripping out zope.rdb.interfaces.DatabaseException is backwards compatibility and deprecation. I can't think of any sane way to do that. Right, so possibly first step should be to at last let Retry and

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

2007-04-26 Thread Brian Sutherland
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