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 F11B4C46F for ; Mon, 10 Mar 2014 13:17:59 +0000 (UTC) Received: (qmail 5141 invoked by uid 500); 10 Mar 2014 13:17:58 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 4928 invoked by uid 500); 10 Mar 2014 13:17:57 -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 4916 invoked by uid 99); 10 Mar 2014 13:17:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Mar 2014 13:17:54 +0000 X-ASF-Spam-Status: No, hits=2.8 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sburkard@gmail.com designates 209.85.219.53 as permitted sender) Received: from [209.85.219.53] (HELO mail-oa0-f53.google.com) (209.85.219.53) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Mar 2014 13:17:49 +0000 Received: by mail-oa0-f53.google.com with SMTP id j17so6993613oag.12 for ; Mon, 10 Mar 2014 06:17:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=pa/+yWznQunjmnfx/pulT12T5qYlV+rGtABRIgbKPd8=; b=cMOE7tkK08DsGjbHxvE8hgPOKnYMRn+b/iEt+Lt8LQneq8HSrq36YjtX/PP6FdgXrq 5AvioJVCy/lb324p9OhLEs89nQy1yuBBfpidrNvb3+bhy84itfCaT8OlX8clAEXo/W65 no9f5L5pq95DeDOnWRkSgrw4VWw8mzrsWm3O1+wofmCP9PzSrIOV+RCnDxuEiaImV/G9 0y3aK4Gkrd0Skk1I+J/rcR6IbmJ0UkJzrOH5viKbd7LTPAZsdOSLwO0XJ6O1NPurFU0R uI9Npuse/l13BtoQjGOK48dTukzSDNl8UhFY6wWm0+kM7cLHqUxKKV/oojlI79DUjzEJ jjMw== MIME-Version: 1.0 X-Received: by 10.182.213.166 with SMTP id nt6mr1555688obc.53.1394457448349; Mon, 10 Mar 2014 06:17:28 -0700 (PDT) Received: by 10.76.132.138 with HTTP; Mon, 10 Mar 2014 06:17:28 -0700 (PDT) In-Reply-To: <1394105451632-5748383.post@n5.nabble.com> References: <1394105451632-5748383.post@n5.nabble.com> Date: Mon, 10 Mar 2014 14:17:28 +0100 Message-ID: Subject: Re: Exception propagation with onException + pipeline From: Stephan Burkard To: users@camel.apache.org Content-Type: multipart/alternative; boundary=001a11c2e60add0a1a04f4406c1f X-Virus-Checked: Checked by ClamAV on apache.org --001a11c2e60add0a1a04f4406c1f Content-Type: text/plain; charset=UTF-8 Yes, if you define your onException globally. Currently you have defined it locally just for the pipeline. See section "Scopes" at http://camel.apache.org/error-handler.html Stephan On Thu, Mar 6, 2014 at 12:30 PM, Jose wrote: > Hi, > > I facing a problem catching exceptions when I use pipeline. > > I have a route like this: > > from("direct:x").pipeline("direct:y").process(processorA) > > The pipeline contains > onException(MyException.class).handled(true).process(....) > > The problem is when an exception is thrown in "processorA". That exception > is not being caught by the "onException" defined within the pipeline. > > I have tried to define "onException" as well on the calling route: > > onException(MyException.class).handled(true).process(...). > from("direct:x").pipeline("direct:y").process(processorA) > > That way it works but I would like to avoid adding this on every route. I > would like to define a global "onException" to handle both the exceptions > thrown within the pipeline and outside the pipeline. > > Is there any way to do that? > > Thank you. > > Jose > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Exception-propagation-with-onException-pipeline-tp5748383.html > Sent from the Camel - Users mailing list archive at Nabble.com. > --001a11c2e60add0a1a04f4406c1f--