I’d suggest you read the “Error Handling” chapter in “Camel in Action” - it covers onException very well.
For me, I use onException wherever possible - it allows me to use error handlers and exception policies which make my life much easier, and it separates the error handling logic from the routing logic. I’m sure there are cases where you must resort to doTry, but I haven’t had to. If you do need doTry, keep in mind that Camel’s regular error handling no longer applies - you need to deal with everything yourself. Hope that helps > On Jun 6, 2016, at 1:31 PM, ravi21588 <ravi21...@gmail.com> wrote: > > Hi All, > Onexception clause and try catch block both can be specified in with in a > camel route. > Can you please let me know the difference and advantage of using one upon > other. > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Onexception-and-try-catch-block-in-camel-tp5783511.html > Sent from the Camel - Users mailing list archive at Nabble.com.