[
https://issues.apache.org/jira/browse/CAMEL-8476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-8476.
--------------------------------
Resolution: Fixed
Thanks for reporting and providing a sample project that demonstrates the issue.
> Unexpected behavior in fault handling with doTry/doCatch
> --------------------------------------------------------
>
> Key: CAMEL-8476
> URL: https://issues.apache.org/jira/browse/CAMEL-8476
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.15.0
> Reporter: Keith Babo
> Assignee: Claus Ibsen
> Fix For: 2.15.1, 2.16.0
>
> Attachments: trywithfault2.zip
>
>
> There seems to be a peculiarity with fault processing when a route consists
> of a single TryProcessor and the MEP for an exchange is InOut. The
> TryProcessor will iterate over any number of processors defined inside of it
> and during each iteration it sets the out msg to the in msg and clears the
> out msg reference. The end result of this is that when the route completes,
> the out reference is cleared and Exchange.isFailed() will return false (it
> checks the out message for fault status). Here’s where things get
> interesting, if I add a single processor after the doTry block, some logic in
> Pipeline kicks in that copies the in message to the out message for InOut
> MEPs before ending the route.
> I have included a unit test which demonstrates the expected behavior and
> current (unexpected) behavior. The expected behavior test fails and the
> unexpected behavior test passes. Additional details can be found as comments
> in the unit test and the camel configuration containing the routes under test.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)