[PEAK] Sitemap driven error handling
Phillip J. Eby
pje at telecommunity.com
Thu Jan 27 10:51:04 EST 2005
At 08:58 AM 1/27/05 +0100, Radek Kanovsky wrote:
>This is proof of concept that works with my simple setup. It would be
>better to introduce some new tag. '<content ...>' is overloaded here,
>view name is constant and only one handler per exception make sense.
>E.g.:
>
> <except type='web.Unauthorized' function='redirectToLoginPage'/>
>
>as equivalent of:
>
> <content type='web.Unauthorized'>
> <view name='handle_error' function='redirectToLoginPage'/>
> </content>
It's a nice idea; I may not want to incorporate it into the current
version, though, as the error handling will become a generic function at
some point and thus the registration mechanism for it might be quite
different than for a view. It will, however, support handling
non-IWebException errors in any event.
In the meantime, I would use a view name like 'peak.web.error_handler',
though, to indicate its special nature.
More information about the PEAK
mailing list