[
https://issues.apache.org/jira/browse/CAMEL-13959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17178467#comment-17178467
]
Ahmed M commented on CAMEL-13959:
---------------------------------
[From Camel Doc|https://camel.apache.org/manual/latest/try-catch-finally.html]
:
_When using doTry .. doCatch .. doFinally then the regular Camel Error Handler
does not apply. That means *any onException or the likes does not trigger*. The
reason is that doTry .. doCatch .. doFinally is in fact its own error handler
and that it aims to mimic and work like how try/catch/finally works in Java.
So maybe try handling errors differently without mixing doTry with onException
there are some useful examples
[here|https://camel.apache.org/manual/latest/exception-clause.html]
> onException does not work
> -------------------------
>
> Key: CAMEL-13959
> URL: https://issues.apache.org/jira/browse/CAMEL-13959
> Project: Camel
> Issue Type: Bug
> Affects Versions: 2.24.1, 3.0.0.M4
> Environment: * Java8, 11
> * camel-2.24.1
> * camel-3.0.0.M4
>
> Reporter: Akihito Nakano
> Priority: Major
>
> I'm facing the specific case that onException does not work.
> Here is a sample application that reproduce the issue.
> https://github.com/ackintosh/on-exception-continue-test
> The "onException" definition show below does not work. I'm expecting that to
> ignore and continue exceptions in the route but I got an exception.
> https://github.com/ackintosh/on-exception-continue-test/blob/master/src/main/resources/order-error-handler.xml#L17-L21
> Quick note:
> If you comment out
> [this|[https://github.com/ackintosh/on-exception-continue-test/blob/master/src/main/resources/order.xml#L22-L27]]
> and enable
> [this|[https://github.com/ackintosh/on-exception-continue-test/blob/master/src/main/resources/order.xml#L29-L35]]
> instead, the "onException" definition will work.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)