You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Antony Grinyer <an...@csw.co.uk> on 2006/10/26 14:15:12 UTC

Intercepting exceptions in cocoon?

Hi all,

 

In version 1 of our application we returned exceptions wrapped in XML so
we could pass the XML down the pipeline and handle the messages
gracefully using XSLT. In version 2 of our application we do not return
our exceptions wrapped in XML (it is a requirement not to) therefore
when we throw an exception now, cocoon shows the horrible stack trace.
So may question is: is there a way to intercept the exception before
cocoon can report it? Can cocoon generators intercept exceptions so we
could write our own generator? Maybe there is a simple answer to this
already (apologies if so)?

 

Thx in advance

Ant


RE: Intercepting exceptions in cocoon?

Posted by Antony Grinyer <an...@csw.co.uk>.
Thanks everyone - that's exactly what I need :)

Ant

-----Original Message-----
From: Ralph Goers [mailto:Ralph.Goers@dslextreme.com] 
Sent: 26 October 2006 15:07
To: users@cocoon.apache.org
Subject: Re: Intercepting exceptions in cocoon?

Have you looked at 
http://cocoon.apache.org/2.1/userdocs/concepts/errorhandling.html?

Antony Grinyer wrote:
>
> Hi all,
>
>  
>
> In version 1 of our application we returned exceptions wrapped in XML 
> so we could pass the XML down the pipeline and handle the messages 
> gracefully using XSLT. In version 2 of our application we do not 
> return our exceptions wrapped in XML (it is a requirement not to) 
> therefore when we throw an exception now, cocoon shows the horrible 
> stack trace. So may question is: is there a way to intercept the 
> exception before cocoon can report it? Can cocoon generators intercept

> exceptions so we could write our own generator? Maybe there is a 
> simple answer to this already (apologies if so)?
>
>  
>
> Thx in advance
>
> Ant
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Intercepting exceptions in cocoon?

Posted by Ralph Goers <Ra...@dslextreme.com>.
Have you looked at 
http://cocoon.apache.org/2.1/userdocs/concepts/errorhandling.html?

Antony Grinyer wrote:
>
> Hi all,
>
>  
>
> In version 1 of our application we returned exceptions wrapped in XML 
> so we could pass the XML down the pipeline and handle the messages 
> gracefully using XSLT. In version 2 of our application we do not 
> return our exceptions wrapped in XML (it is a requirement not to) 
> therefore when we throw an exception now, cocoon shows the horrible 
> stack trace. So may question is: is there a way to intercept the 
> exception before cocoon can report it? Can cocoon generators intercept 
> exceptions so we could write our own generator? Maybe there is a 
> simple answer to this already (apologies if so)?
>
>  
>
> Thx in advance
>
> Ant
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Intercepting exceptions in cocoon?

Posted by Bertrand Delacretaz <bd...@codeconsult.ch>.
On 10/26/06, Antony Grinyer <an...@csw.co.uk> wrote:

> ...is
> there a way to intercept the exception before cocoon can report it?

Yes, using <map:handle-errors>, have a look at the error handling samples at
http://cocoon.zones.apache.org/demos/release/samples/errorhandling/welcome

-Bertrand

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org