Hi Camel community,

I have observed following, if an exchange carries
an exception, like in the onException() block, then:

  .log(...)
  .doTry()
  .removeProperty(...)

behaves very differently from:

// .log(...)
  .doTry()
  .removeProperty(...)

If the exchange carries an exception, then with log(),
the doTry() block body executes. Without log(),
the doTry() block body does not execute. My deduction is
that log() clears the exchange exception, while doTry()
does not and if facing a prior exception then the doTry()
flow continues at its doCatch()/doFinally() block.

I'd expect that doTry() should not consider the prior exception
but it should rather consider only exceptions thrown
in the doTry() block itself, like the regular Java try block.

Let me know if there is a design intent behind the observed
doTry() behaviour.

Else let me contribute it as an issue. It is observed while
riding Camel 3.22.2 (the latest in the 3.x series).

  Hope it helps
  Cc.

--

  Mr. Petr Kužel, Software Engineer
  Eurofins Scientific S.E.
  L-8399 Windhof


Reply via email to