camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jackkirsten <>
Subject Camel OnException handling
Date Sun, 11 Dec 2011 21:16:37 GMT
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?

*    .onException(RuntimeException.class).maximumRedeliveries(0)
	.log("***** Some Runtime Exceptions Occured. *****")
	.log("***** Some Checked Exceptions Occured. *****")

Thanks, Jack

View this message in context:
Sent from the Camel Development mailing list archive at

View raw message