[Zope] Re: Transactions in Zope?

Chris Withers chrisw@nipltd.com
Sun, 25 Nov 2001 04:00:38 +0000


Bruce Eckel wrote:
> 
> I'd like to both
> * catch the exception and produce an error message for the user
> * use the rollback mechanism in Zope

try this:

         except smtplib.SMTPSenderRefused:
             get_transaction().abort()
             return "Invalid email address: please press your"
                    "browser's 'back' key and correct it"

> Can I have my cake and eat it too?

Tell me what it tastes like :-)

Chris