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

onException(Throwable.class) does not catch java.lang.AssertionError

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Information Provided
    • 4.4.0
    • None
    • came-core
    • None
    • Unknown

    Description

      The onException(Throwable.class) does not catch java.lang.AssertionError in 4.4.0.  It worked fine in 3.18.x.

      Here is a sample:

      from("timer://test?repeatCount=1")
          .onException(Throwable.class).handled(true).log("in onException").end()
          .process({
              assert false : "test onException for assert"
          }) 

      The onException would not catch the assert failure and not print "in onException" in log.  The onException can catch other exceptions.

      Attachments

        Activity

          People

            Unassigned Unassigned
            bocamel John Yin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: