On Tue, May 12, 2009 at 2:13 AM, Joe Gottman <josephgott...@comcast.net> wrote:
>
>   I am using Camel version 2.0M1.  When I call unmarshal() using the Jaxb
> format I want to handle any exceptions thrown by the unmarshal() call.  I
> use an onException() statement and the Exception is being caught.  However,
> when I later try to handle the exception by setting the Message body to my
> own error string, this always fails.  The output is always the same stack
> trace that I would have gotten if I had not handled the exception.
Hi

Can you show the route DSL how you do this? You should generally use
handled(true) to clear the exception.
Or use doTry() .. doCatch() just as you would use try .. catch in normal Java
http://camel.apache.org/try-catch-finally.html

Or if you use a processor, you should be able to do
exchange.setException(null) to clear the exception.



>
> --
> View this message in context: 
> http://www.nabble.com/Handling-Exception-from-marshal-unmarshal-tp23494097p23494097.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Apache Camel Reference Card:
http://refcardz.dzone.com/refcardz/enterprise-integration
Interview with me:
http://architects.dzone.com/articles/interview-claus-ibsen-about?mz=7893-progress

Reply via email to