You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Steve Krulewitz <sh...@mm.st> on 2004/09/11 21:53:55 UTC
handle-errors and the SitemapSource
Hey all --
I am working on a project that does a lot of aggregation using the
CIncludeTransformer and the SitemapSource (cocoon://). When one of
these aggregated sources throws an exception, I would like to return
different xml rather than having the exception bubble up to the root
sitemap's handle-errors. However, a pipeline's handle-errors does not
get called when the pipeline is invoked using the SitemapSource. This
has come up before and there was a proposed solution [1] but I can't
tell if anything has come of it.
Has anyone made any progress on this?
cheers,
-steve
[1] http://marc.theaimsgroup.com/?m=107876029119774
Re: handle-errors and the SitemapSource - workaround
Posted by Steve Krulewitz <sh...@mm.st>.
Looking at the source, I can't see any obvious way for the SitemapSource
to get access to the pipeline's error handler. So taking the cowards
way out, I created a new SitemapSource called
ErrorHandlingSitemapSource. I added some code to use the SourceUtil to
call another pipeline (provided as a parameter) if the original pipeline
source fails.
Does this sound ok? I am concerned about what would happen if the
original pipeline threw an exception after producing some sax events --
this might lead to some strange combination of the original pipeline and
the alternate pipeline. Or does the pipeline only start producing
events after the pipeline is processed?
cheers,
-steve
Steve Krulewitz wrote:
> Hey all --
>
> I am working on a project that does a lot of aggregation using the
> CIncludeTransformer and the SitemapSource (cocoon://). When one of
> these aggregated sources throws an exception, I would like to return
> different xml rather than having the exception bubble up to the root
> sitemap's handle-errors. However, a pipeline's handle-errors does not
> get called when the pipeline is invoked using the SitemapSource. This
> has come up before and there was a proposed solution [1] but I can't
> tell if anything has come of it.
>
> Has anyone made any progress on this?
>
> cheers,
> -steve
>
> [1] http://marc.theaimsgroup.com/?m=107876029119774