[Zope3-dev] Exception Handling in ZopePublication
Stephan Richter
srichter at cosmos.phy.tufts.edu
Mon Aug 30 08:18:41 EDT 2004
On Mon, 30 Aug 2004, Eckart Hertzler wrote:
> Hi,
>
> I have a question about the exception handling
> of ZopePublication.
>
> I have a custom exception view for the Unauthorized exception, that needs to
> know in which object the Exception was raised.
>
> The intended behaviour seems to be to provide this information as the location
> of the exception during execution of handleException.
>
> At least that is how I interpret this comment:
> [snip]
> # We need to get a location, because some template content of
> # the exception view might require one.
> [snip]
>
> But if an Unauthorized exception is raised during traversal, the location will
> always be the root folder (or the value returned from the call to
> getApplication), which is not very interesting in my case.
>
> Wouldn't it be better if something like request._last_obj_traversed is used ?
I agree, this would be better.
Regards,
Stephan
PS: My computer is down due to a broken CPU fan. So I will be less
responsive than usual.
More information about the Zope3-dev
mailing list