Hi folks,

In reading the following:
https://camel.apache.org/manual/exception-clause.html#_how_does_camel_select_which_clause_should_handle_a_given_thrown_exception


   -

   the order in which the onException is configured takes precedence. Camel
   will test from first…last defined.
   -

   Camel will start from the bottom (nested caused by) and recursive up in
   the exception hierarchy to find the first matching onException clause.
   -

   instanceof test is used for testing the given exception with the
   onException clause defined exception list. An exact instanceof match
   will always be used, otherwise the onException clause that has an
   exception that is the closets super of the thrown exception is selected
   (recurring up the exception hierarchy).


Is it the case that practically speaking, only the second and third bullets
come into play? The documentation is slightly confusing each time in that
the first implies that exception handling starts from top to bottom without
regard for the exception's class hierarchy, whereas the second and third
and subsequent examples seem to have my intuitive understanding in mind
where more specific exceptions, regardless of when they are defined (e.g.
in a route configuration or in a route), will be caught. I should note that
Camel In Action doesn't seem to mention the first bullet either. Is this
the right take?

Best,
Anthony

Reply via email to