Re: zope2 rdb and reconnect
"Dieter Maurer" <[email protected]> Mon, 10 Dec 2007 19:22:50 +0100
| Newsgroups | gmane.comp.web.zope.database |
|---|---|
| Message-ID | <[email protected]> |
[email protected] wrote at 2007-12-9 13:42 -0500: >Found the problem. >I back ported this connector from a zope3 app. For the retry, being >raised was rdb.interfaces.Retry, I changed it to raise ZPublisher.Retry, >which works for zope2. > >Maybe there is a better way for zope2, but this works. A better way would be to raise an exception derived from "ConflictError". Such an exception would cause ZPublisher to perform the "Retry" and with a good name for your new exception you would clearly see what happened in case, the exception were repeated. -- Dieter