Move it outside the route so its context scoped onException instead.

On Thu, Sep 12, 2013 at 4:29 PM, fbarbat <fbar...@gmail.com> wrote:
> Hi,
>
> I have these routes:
>
> from("direct:a").routeId("1")
> .onException(Exception.class).handled(true).to("direct:d").end()
> .to("direct:b").to("direct:c");
>
> from("direct:b").routeId("2").process(new ThrowingExceptionProcessor());
> from("direct:c").routeId("3").process(new OkProcessor());
>
> from("direct:d").routeId("4").process(new ExceptionProcessor());
>
> Let's suppose a message comes to route 1. If ThrowingExceptionProcessor
> throws an exception I would expect that the exception would be handled by
> the onException clause. However, it looks like the exception is propagated
> directly to the consumer ("direct:a"). How can I force the exceptions thrown
> inside "child routes" to be managed by the onException clause?
>
> Thanks.
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/DefaultErrorHandler-and-nested-routes-tp5739261.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to