Hi, I have the following OnException blocks for both generic checked
exception and runtime exceptions. When I purposely throw the runtime
exception such as (NullPointerException) from the process method, only
Exception.class block is executed and NOT the Runtime.Exception block. Why
is it doing this? How do I fix this so that the appropriate exceptions go
to the correct onException blocks?
from("seda://OrderID")
.routeId("OrderProcessorRoute")
* .onException(RuntimeException.class).maximumRedeliveries(0)
.handled(true)
.log("***** Some Runtime Exceptions Occured. *****")
.inOut("direct:exceptionHandling")
.end()
.onException(Exception.class).maximumRedeliveries(5)
.redeliveryDelay(6000)
.handled(true)
.log("***** Some Checked Exceptions Occured. *****")
.inOut("direct:exceptionHandling")
.end()
*
.transacted("TestTXPolicy")
.inOut("bean:OrderProcessor?method=processStep1")
.inOut("bean:OrderProcessor?method=processStep2")
Thanks, Jack
--
View this message in context:
http://camel.465427.n5.nabble.com/Camel-OnException-handling-tp5066566p5066566.html
Sent from the Camel Development mailing list archive at Nabble.com.