[Zope-dev] post publishing hook

Dieter Maurer dieter at handshake.de
Fri Apr 1 15:45:55 EST 2005


Florent Guillaume wrote at 2005-4-1 17:48 +0200:
> ...
>Open issues are:
>1. what if there's an exception in the hook? I'd say log it but that's all.

I prefer: fail in the usual way.

>2. what if there's a Conflicterror? That's tougher to deal with... The 
>transaction has to be retried, without the user being aware of it, so it 
>means the hook should probably be called *before* things are sent to the 
>browser.

As you do it in the same transaction, you usually do it
before anything is sent to the browser (unless someone
uses "RESPONSE.write").

I would handle the post publishing hook identical to
the main request action.

-- 
Dieter


More information about the Zope-Dev mailing list