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 18:18:31 UTC

Re: Why is Camel silently dropping exceptions? *** DISREGARD ***

After RTFM, I see what's happening  - sorry for the noise...

On Tue, May 14, 2013 at 11:49 AM, Chris Wolf <cw...@gmail.com> wrote:
> 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