You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Chris Wolf <cw...@gmail.com> on 2013/05/14 17:49:21 UTC

Why is Camel silently dropping exceptions?

I implemented a custom route policy, which never appeared to be
starting.  I finally traced with a debugger
and found that it's throwing an exception, which appears to be discarded.

In the DefaultCamelContext.addRoutes(...) is this code:

if (routePolicyList != null && !routePolicyList.isEmpty()) {
  for (RoutePolicy policy : routePolicyList) {
    // add policy as service if we have not already done that (eg
possible if two routes have the same service)
    // this ensures Camel can control the lifecycle of the policy
    if (!camelContext.hasService(policy)) {
      try {
        camelContext.addService(policy);
    } catch (Exception e) {
      throw ObjectHelper.wrapRuntimeCamelException(e); <=== Never seen
in log or console-  where is it?????
    }
  }
}

Obviously, I am not understanding how exceptions are handled in Camel
- can someone help me?

Thanks,

Chris