> From: Nicola Ken Barozzi [mailto:[EMAIL PROTECTED]]
> 
> From: "Jeremy Quinn" <[EMAIL PROTECTED]>
> 
> > Dear All,
> >
> > I am totally mystified as to how you are supposed to handle errors
in
> > webapps built using Cocoon.
> >
> > When ever a component in my app throws an exception, I get my
(partial)
> > processed XML (as expected) but it is followed by the error
definition.
> >
> > That is, I get _two_document_roots_ !!!!
> >
> > How are we supposed to do anything with this? ;)
> >
> 
> Dear Jeremy,
>  this is a known issue, and basically a worksforme.
> 
> Since we use SAX, and the processing is incremental, to augment the
users
> percieved performance and decrease memory usage we send the results as
soon
> as they are ready.
> 
> This means that the error happens when partial results are already
> committed, and error info can only follow already committed output.
> 
> If you want you can change the error stylesheet to have inside a
javascript
> that redirects the user to a clean error page, or simply output a <p>
tag
> that says that an error occurred.
> 
> If you have a better solution, please commit it, we are all waiting.

This reminds me of TODO item (in the todo.xml):
----
  <action context="code">
   Check how to handle the mixing of output streams when an error inside
   a pipeline occurs. When the pipeline has something written to the
   output stream and then an error occurs the result is the first
written
   part with the appended exception.
   One solution could be a configurable intermediate output stream.
  </action>
----

Jeremy, that's what you want, isn't it?

Vadim



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to