[Cc zope-dev and not zope3-dev anymore as my question is now zope 2 related...]

Ok so Jim mentionned it was possible to do rollback of subtransactions in Zope 2. How can I do that ? What's the idiom that would be equivalent to:

tid = startSubTransaction()
if something:



Steve Alexander wrote:

Why are you catching the exception?

Because I want to display a nice message to the user. If I don't catch the exception, it will go up to the Publisher that will display a not-nice error message. Hm are you suggesting I could provide a custom error message for that particular exception? That could work, but I would have like the flexibility of catching the exception from normal skin code and display my error message there.

Jim already mentioned a customised view on the exception.

Another option that is not as architecturally clean, but might work better for you, is to catch the exception, but doom the transaction.

I wonder if it's a good idea to support having an application say "I want to doom this transaction", and have the publication object just abort that transaction without returning an error page.

Steve Alexander

-- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:[EMAIL PROTECTED]

Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Reply via email to