camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Quinn Stevenson <>
Subject Re: Onexception and try catch block in camel.
Date Mon, 13 Jun 2016 17:26:18 GMT
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 <> 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:
> Sent from the Camel - Users mailing list archive at

View raw message