Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1B3E410B00 for ; Thu, 12 Sep 2013 14:40:58 +0000 (UTC) Received: (qmail 77764 invoked by uid 500); 12 Sep 2013 14:40:54 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 77650 invoked by uid 500); 12 Sep 2013 14:40:54 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 77610 invoked by uid 99); 12 Sep 2013 14:40:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Sep 2013 14:40:53 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of claus.ibsen@gmail.com designates 209.85.223.169 as permitted sender) Received: from [209.85.223.169] (HELO mail-ie0-f169.google.com) (209.85.223.169) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Sep 2013 14:40:48 +0000 Received: by mail-ie0-f169.google.com with SMTP id tp5so22187101ieb.14 for ; Thu, 12 Sep 2013 07:40:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=KfUR7F6X8K9bCM0L8U3f/4EFcf7XYHLhiAw+GNkcoIk=; b=bnwRyjvcZWq+8rBwtvzcIjMd6c4Ndipydq4mZ+ACScEsQfKtLMqg/L1aWcalZ3h3/9 QjSAigsnpMQFbHkqIpE0M7ehC+laEvSuIyP9vBTB3UXqWSTSQZ7TF6V1j/wE1cwQNrIz vqfV1IEfRyEtvYN/FSqeoY9KyzJkArq9/T+SBUpIEOMoMhGoBnloO1eIoXSoqetFTGfi 8uvbxvPQIbo6WqwlWGJwKkbRap9USq5GXKOnHAHmqwM1H6iPlJNIiMD453lheIMh4i4G WrFsMD9i+s6F9+FvftGcJykFcH1H7L9CA+NTVvxZ1+HXyAD8GkTkC/HFxHFchCFG6mS2 cHzQ== X-Received: by 10.50.136.200 with SMTP id qc8mr13471287igb.52.1378996827375; Thu, 12 Sep 2013 07:40:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.20.196 with HTTP; Thu, 12 Sep 2013 07:40:07 -0700 (PDT) In-Reply-To: <1378996158796-5739261.post@n5.nabble.com> References: <1378996158796-5739261.post@n5.nabble.com> From: Claus Ibsen Date: Thu, 12 Sep 2013 16:40:07 +0200 Message-ID: Subject: Re: DefaultErrorHandler and "nested" routes To: "users@camel.apache.org" Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Move it outside the route so its context scoped onException instead. On Thu, Sep 12, 2013 at 4:29 PM, fbarbat 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: cibsen@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen