You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by toomanyedwards <to...@gmail.com> on 2015/02/19 21:30:17 UTC

Why does the default Camel onException match go from bottom up of exception cause?

Hi all,
  I'm relatively new to Camel and am working on exception handling in our
Camel route.   My question is why does the default camel exception policy
search for onException matches from the bottom of the exception cause stack
vs from the top?

Seems like matching from the top down would make more sense.  Consider the
example where a SQLException can be the root cause of either an application
AuthenticationException or an AuthorizationException.  Given Camel's default
exception matching policy, I can't have onException handlers for
AuthenticationException, AuthorizationException and SQLException because
since the SQLException onException handler will be used for all of them.  If
the exception matching policy searched from the top down of the cause stack
then all three handlers would work as expected.

-e




--
View this message in context: http://camel.465427.n5.nabble.com/Why-does-the-default-Camel-onException-match-go-from-bottom-up-of-exception-cause-tp5762957.html
Sent from the Camel - Users mailing list archive at Nabble.com.