Comment 17 for bug 372632

Revision history for this message
David Glick (davisagli) wrote : Re: [zope2-tracker] [Bug 372632] Re: zope 2.12.0b1 does not use standard_error_message

On Jul 20, 2009, at 7:38 AM, Tres Seaver wrote:
> I think Hanno's recent changes have fixed this regression. David, can
> you test against the 2.12 branch and the trunk?

No, it's still an issue. I have been tracking the 2.12 branch (and
have no reason to think trunk would be different) as Hanno first made
the ZPublisherExceptionHook re-raise Unauthorized exceptions
immediately, then reverted that change because of it meaning that
Unauthorized exceptions wouldn't get logged to the error_log.
Following that initial change, Unauthorized exceptions were getting re-
raised and handled by the response object's exception method as
desired (though without getting recorded in the error_log). Now that
the change has been reverted, Unauthorized exceptions result in the
standard_error_message.

I worked around this issue for Plone (4.0 branch) by registering a
view of Unauthorized exceptions which simply re-raises the original
exception. This happens after the error is logged but before the
standard_error_message is raised, so resolves the issue pretty decently.

peace,
David