cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SAXESS - Hussayn Dabbous <>
Subject enhanced error reporting (partial solution)
Date Sun, 03 Nov 2002 17:19:48 GMT

On my site whenever a part of a pipeline aggregation fails,
cocoon will silently return without reporting an error.
In the following i explain, how i solved this problem
at least partially. I am unshure, if i should send a patch,
so i follow the suggestions in your contrib document and
post this to the mailing list.

Here we go:

environmental info:
I am using cocoon-2.0.3 + tomcat-4.1.12

I could by now track down the problem to

In the following peace of code the problem is marked
by "<== bad". The code appears several times within the
catch blocks in method service(...):

if (manageExceptions) {
     res.reset();  <== bad

     SimpleNotifyingBean n = new SimpleNotifyingBean(this);
     . . .

When processing an aggregation, res is filled as the
parts get processed. Hence, if an error occurs in the
middle of production, res.reset() fails.
But unfortunately not only that. It also terminates the
current request processing silently.

During my further investigation i found, that the response
processing is managed by an HttpEnvironment instance.
This class already offers the method


which correctly checks, if the response output stream already
is committed, or not. Only in the latter case the output stream
is really reset. The method returns true, if it succeeds.

This lead me to modify the line marked above as follows:

if (manageExceptions) {
     env.tryResetResponse();  <== better

     SimpleNotifyingBean n = new SimpleNotifyingBean(this);
     . . .

(i had to move the declaration of env to another place though)

When i now request an erroneous page, the result is:

1.) I can see all parts, that have been processed so
     far on the screen (same behaviour as before).
2.) Additionally I see the error infos positioned
     at the bottom of the page.

This behaviour helps getting aware of error conditions.

regards, hussayn

Dr. Hussayn Dabbous
SAXESS Software Design GmbH
Neuenhöfer Allee 125
50935 Köln
Telefon: +49-221-56011-0
Fax:     +49-221-56011-20

To unsubscribe, e-mail:
For additional commands, email:

View raw message