You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Alexander Smirnoff <as...@vistar.ca> on 2002/02/13 23:27:24 UTC

Error handling design question

After playing with cocoon for few month I found that it quite
strong and bold to be used in production environment. But
there are some weak points which I've noticed.

One of those is abnormal situation handling in XSP files. So
far I've tried few approaches.

The requirement is :

In the case of error present XML message containing the 
error number and the reason of error occurred.

First straight-forward approach was to use
request.sendRedirect(messagepage) method. But this in
some cases will result in IllegalStateException.

Second (which we are using in our application) is embedded
message approach. In the case of error message is 
embedded in XSP and later in the pipeline is filtered from
excessive tags. The only drawback of this approach is that
in some cases the execution of XSP must be terminated
with "return" statement or throwing an exception, which 
means all open SAX events must be consistently 
closed. Using <autocomplete-documents> will cause 
additional CPU load.

Maybe there are better solutions?

I'll appreciate to get some new opinion about this issue.

Thanks,
Alex.



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>