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 12:28:24 GMT

Sylvain Wallez wrote, On 29/04/2003 10.29:
> Carsten Ziegeler wrote:
> 
>> Björn Lütkemeier wrote:
>>  
>>
>>> currently it is explicitly prohibited in Cocoon to use
>>> <map:redirect-to>-tags within error handlers. Please see our proposal 
>>> for
>>> changing this a few days ago, for which we did not get any answer
>>> (http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=105110034516051&w=2).
>>>
>>> If no one disagrees, we would like to start changing the 
>>> treeprocessor, so
>>> that redirects are allowed within error handlers due to the explained
>>> reasons.
>>>   
>> I would like to add that we allowed a redirect in an error handler
>> until recently; the ability was removed during the changes to allow
>> different error generators.
> 
> This contraint was added to make Nicola Ken happy. 

:-PPPPPPP

> I personally didn't 
> have good feelings about it, but really wanted custom generators in 
> error handling.
>
> So, since it seems to make more people unhappy : constraint removed !

I still think that this is bad, for the infinite error loop. And no, we 
should not make this possible, because errors can always occur in 
sitemaps, and infinite loops in a web server are really bad. Furthermore 
it also makes it easy to start using error handling for app flow , and 
it should *not* be it.

As for the fact that redirects can be done in Actions, well, it should 
*not* be possible in handle-errors. It was a bug.

Now that generators can be used, users can generate from another 
pipeline, and it's a forward, and include, not a redirect.

Handle errors should not have a goto to external code. No gotos there, 
please.

Why would you want a redirect now that generators are possible? I don't 
like redirects there, please remove this.

I also think that redirects in Actions are equally bad, as only the 
sitemap and the flow should redirect, based on the results of the 
components. Redirects in code are a bad programming practice.

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


Mime
View raw message