I was trying to wrap the caught exception that comes into the exchage and
wrap it into another custom exception .

After this wrapping I need to set this exception into a custom exchange .
I have discoverd later from @Claus Ibsen-2  that Camel won't cont. routing
when I use 

    exchange.setException(ex)

I have managed to do some work around by doing the following @ processor : 

    exchange.getOut.setHeader("ex",customException) 

then @Route : 

   
this.onException(classOf[IOException]).process(doSmth).log(LoggingLevel.INFO,
"new", ${in.header.ex} ") 


It prints into my log the following and that what I exactly need from the
beginning : 
CustomException: java.lang.IOException 


Thx for ur assistance

--
View this message in context: 
http://camel.465427.n5.nabble.com/Set-different-exception-on-exchange-at-the-processor-tp4615500p4619687.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to