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 16:34:24 GMT
Björn Lütkemeier wrote:
> Hi,
> 
> 
>>Perhaps Cocoon should detect potential infinite loops as a feature.
>>
> 
> 
> that would really be a very great feature solving the problem, any idea how
> to implement it ;-)
> 
> But as I said: In my opinion it is not the task of the underlying system
> (Java, Cocoon or whatever) to prevent or detect infinite loops. It is and
> remains to be a mistake of the developer. But if he nonetheless likes to
> redirect in an error handler for whatever reason, he should be able to. At
> any other point of the sitemap he has this possibility, too.

This is where we disagree whole-heartedly.

Let me ask you, what do you do with exception handling?

You can't use code that can generate new exceptions unless you nest a
new try/catch block inside that.

Eventually you have to do one of two things: give up and die or handle
the exception as gracefully as possible.

Think of error handlers in the same way.  The Java language, and many
other languages restrict what you can do in an exception/error handler.
Since you are so fond of using the language as an example of how to do
things, here is an example of where the language restricts what you
can do.

There needs to be some restrictions in your error handlers, and I will
restate that you should not allow anything that can generate an error
in an error handler, unless your user explicitly handles that error
as well.

-- 
"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