You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Brian Lee <yi...@hotmail.com> on 2022/09/22 10:25:40 UTC

*QUESTION* Apache Camel To D - Try Catch Finally

Dear Mr/Mrs,

I'm trying to use doTry, doCatch, and doFinally for ToD as shown in the screenshot.

However, the error was thrown inside the "sub-route" called in ToD and it was not catch by DoCatch.

May I know if there is any other way to catch error while calling ToD, and ignore the exception?

note: I'm using YAML DSL on Apache Camel 3.17.0 in SpringBoot.

Looking forward for your reply!

Thanks and regards,
Brian

Re: *QUESTION* Apache Camel To D - Try Catch Finally

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

There is no screenshot in this email.
But if you call a sub route then it has its own error handler, so you need
to turn this off for the route to let it work with your doTry .. doCatch.
Or avoid calling a sub route.

On Thu, Sep 22, 2022 at 3:37 PM Brian Lee <yi...@hotmail.com> wrote:

> Dear Mr/Mrs,
>
> I'm trying to use doTry, doCatch, and doFinally for ToD as shown in the
> screenshot.
>
> However, the error was thrown inside the "sub-route" called in ToD and it
> was not catch by DoCatch.
>
> May I know if there is any other way to catch error while calling ToD, and
> ignore the exception?
>
> note: I'm using YAML DSL on Apache Camel 3.17.0 in SpringBoot.
>
> Looking forward for your reply!
>
> Thanks and regards,
> Brian



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2