michelts wrote:
What is the correct syntax or who is wrong, the code or the doc?
Anyway I can't redirect the page to another one or can't write the
data, Is this correct? Am I doing something wrong? Do you have any
working example of handleExceptions usage?

My goal is to catch the Forbidden exception raised by LoginKit, I want
to tell the user it is not allowed to view the content on a better
way...

Hmm... the exception handling was always fuzzy. LoginKit is the only thing using it now, catching HTTPUnauthorized, I believe. I think that's working (though I don't usually raise that exception directly), and even then I put in some dumb workarounds for 0.8.1 compatibility, so I don't know what's correct and incorrect in it now.


All exceptions actually go to component.Component.handleExceptionEvent, and it in turn dispatches the exception. From that it looks like the docs are wrong, and HTTPForbiddenEvent should be called. I can't see any reason that would be a problem. Hmm... *except* that it should check for "break" as from the sub-event-handler and pass that back up, like a change from line 141:

result = meth(exc)
if not result or result == 'break':
    return result

--
Ian Bicking  /  [EMAIL PROTECTED]  /  http://blog.ianbicking.org


------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to