cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <nicola...@apache.org>
Subject Re: Allow redirects inside error handling
Date Tue, 29 Apr 2003 16:30:42 GMT


Carsten Ziegeler wrote, On 29/04/2003 16.11:
> By removing the redirect in the error handling you can't prevent
> infinite loops. Imagine the client requests "document", the
> corresponding pipeline produces an exception and the error handler
> is called. In the error handler I make a <map:generate
> src="cocoon:/document"/>
> And I have an infinite loop without a redirect.

As I said many times (yes I'm a PITA), generation in the handle-errors 
should be allowed only without this possibility, and no redirects in 
actions.

This was also why I wanted generatiors out of handle-errors, and the 
condition was part of the deal of removing the veto.
If it's not done, I won't complain, since this is OS and if I really 
want I can fix it myself. But this does not mean that it's not a bug.

> Can you prevent a user from doing so?

Yes. Make handle errors look at the stacktrace or something like that 
and see if it was called already. If so, break the loop and return a 
general error.

Anyway, having loops is not the only reason of not having redirects, 
it's also that handle-errors is a dead end and should remain so, by 
design, just like serializers exit a pipeline processing, by design.

You have not yet shown me though why redirects are needed ;-)

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Mime
View raw message