You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Bruce Perryman <bp...@yahoo.com> on 2004/05/01 00:46:56 UTC
Exception Handling with
Hello,
How would I catch several errors of type processing
exception?
What I want to do is catch when the session
transformer fails, and when the sql transformer fails.
Is there a place in the documentation that describes
the error codes? If so, I think I can use the
XPathException Selector. Right now, it appears that
all I can catch is the processing exception or the
java sql exception.
Thanks.
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Exception Handling with
Posted by Joerg Heinicke <jo...@gmx.de>.
On 01.05.2004 00:46, Bruce Perryman wrote:
> Hello,
>
> How would I catch several errors of type processing
> exception?
>
> What I want to do is catch when the session
> transformer fails, and when the sql transformer fails.
>
> Is there a place in the documentation that describes
> the error codes? If so, I think I can use the
> XPathException Selector. Right now, it appears that
> all I can catch is the processing exception or the
> java sql exception.
The default ExceptionSelector can indeed only differ the handling based
on the Exception class while the XPathExceptionSelector accepts an
additional xpath expression.
From what I read at
http://marc.theaimsgroup.com/?t=104970559200005&r=1&w=4 (I only found
that) is that the XPath is evaluated in the context of the exception
using JXPath. This means if you have an expression "errorcode = 10" you
would need in your exception a method getErrorcode() - that's how JXPath
works.
Hope this is correct and helps - otherwise I had to look into the code :)
Joerg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org