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

Infinite recursion if exception happens inside exception handler

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.18.3
    • 2.18.4, 2.19.1, 2.20.0
    • camel-core
    • None
    • Advanced

    Description

      Use an onException handler like this:

      onException(Throwable.class).to("direct:handle_er");
      from("direct:handle_er")..throwException(new RuntimeException());

      If the main route throws an exception then this will create an infinite recursion of exceptions.

      I would expect that camel handles the exception inside an onException handler differently. So the onException is not called again.

      Attachments

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              cschneider Christian Schneider
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: