[Zope-dev] Re: [Zope3-dev] substransactions and beforeDelete
Florent Guillaume
fg at nuxeo.com
Wed Jan 7 12:31:39 EST 2004
[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:
rollbackSubTransaction(tid)
Thanks,
Florent
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:fg at nuxeo.com
More information about the Zope-Dev
mailing list