cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: Allow redirects inside error handling
Date Tue, 29 Apr 2003 14:16:18 GMT
Berin Loritsch wrote:
> Björn Lütkemeier wrote:
> 
>> Hi,
>>
> 
>> As far as I see the problem with infinite loops does not only occur in
>> conjunction with error handling. Even with normal pipelines you are 
>> able to
>> configure an infinite loop. Cocoon does not prevent you from doing so,
>> because as I said before it is your fault, not a bug in the system.
>> It is the same in Java: The Java language does not prevent you from
>> implementing infinite loops. When you do so, you made a mistake in your
>> program and have to fix it. Therefore I do not see any reason to allow
>> redirects anywhere in the sitemap, but forbid them in error handlers. 
>> This
>> would be a bad restriction that is not necessary at all in my opinion.
> 
> 
> 
> And when that user asks you why they can't see what's wrong in their
> application (because they will) but it goes into an infinite loop, you
> can explain that to them.
> 
> Perhaps Cocoon should detect potential infinite loops as a feature.

Also keep in mind that Java has this interesting little exception called
StackOutOfBoundsException so that if your infinite loop spanned several
methods (which I recently ran into an application that did this), you
will get this exception so that you can break out of the loop.  Think of
error handlers as the "catch" part of a try/catch/finally structure.
Almost all developers (even new ones) put very simple error hanlding
logic so you can correct it.

Putting too much in your catch block is bad programming IMNSHO.


-- 
"You know the world is going crazy when the best
rapper is a white guy, the best golfer is a black guy,
The Swiss hold the America's Cup, France is
accusing the US of arrogance, and Germany doesn't want
to go to war. And the 3 most powerful men in America
are named 'Bush', 'Dick', and 'Colon' (sic)".

-----Chris Rock


Mime
View raw message