You can use the try ... catch ... finally DSL[1] if you want to check
the exception you want per route.
The "onException" is a more generic way to handle the exception per
RouteBuilder.
[1]http://camel.apache.org/try-catch-finally.html
On Fri Jul 13 00:09:02 2012, smadarapu wrote:
I think i figured it out, the "onException" set up is per RouteBuilder and
not per Route, so I removed the onException setup from route to the route
builder and it is working as i want it.
What i still don't understand is why does the Route definition supports the
"onException" setup, what is the purpose?
Also the per route builder setup adds a limitation that I cannot have the
definition of two routes (in the same RouteBuilder class) that need
different handling of the same exception.
Thanks
Srikanth
--
View this message in context:
http://camel.465427.n5.nabble.com/Exception-handling-in-Camel-Routes-tp5715952p5715962.html
Sent from the Camel - Users mailing list archive at Nabble.com.
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang