Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-15020

Improve FAQ: Why is the exception null when I use onException?

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.0
    • Component/s: documentation
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      The FAQ article Why is the exception null when I use onException? states that exchange.getException() returns null if onException() is used in conjunction with handled(true).

      Whether it's handled or not, exchange.getException() return always null since the default error handling mechanism clears the exception already:

      RedeliveryErrorHandler.deliverToFailureProcessor() - Camel 2.25.0
      // we did not success with the redelivery so now we let the failure processor handle it
      // clear exception as we let the failure processor handle it
      exchange.setException(null);
      

      I'm fairly new too Camel error handling, it would've been helpful in advance to know it.

      References:

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              thokuest Thomas K├╝stermann

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment