Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D48FF200B11 for ; Mon, 13 Jun 2016 19:26:26 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D3306160A3C; Mon, 13 Jun 2016 17:26:26 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 283EA160A1A for ; Mon, 13 Jun 2016 19:26:26 +0200 (CEST) Received: (qmail 80496 invoked by uid 500); 13 Jun 2016 17:26:25 -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 80484 invoked by uid 99); 13 Jun 2016 17:26:24 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jun 2016 17:26:24 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 3CE09C1A26 for ; Mon, 13 Jun 2016 17:26:24 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.593 X-Spam-Level: X-Spam-Status: No, score=0.593 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=pronoia-solutions-com.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id mW6PY1fhVPrd for ; Mon, 13 Jun 2016 17:26:22 +0000 (UTC) Received: from mail-it0-f54.google.com (mail-it0-f54.google.com [209.85.214.54]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id BD32A5F341 for ; Mon, 13 Jun 2016 17:26:21 +0000 (UTC) Received: by mail-it0-f54.google.com with SMTP id e5so11591976ith.1 for ; Mon, 13 Jun 2016 10:26:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pronoia-solutions-com.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=+j0ny/Rz4CiPjURr/NWLpBLeO869cif25qD8wS+oZ5U=; b=MhuCa+ZtCAv0rbxwHV/RvYElC3bxYxAHraFXxOWvDO/w9Y6lQVH5xlhr5wUgVy15M0 U5xQdGXSmw2ozPd7gxeix0RoXj5q0BlXvRerb5LH74tWaSV1GxzYRqgy3DJeXv3u97xN rlAQp15jGS2H8IVBhv9LzwxzQbkxFDeWfC3W2sEntFSmcifL761moEe97XBxHBMw7Qua KfMw0v+YB59oJSYrSBJAaTULY36fcP1XsQAKA6c9Qxvi/pgz6bufdyP+zGB0Z90mnkBt 3+8lfOV+y9e+tuVDXagF8iOVAyHIcNAkQjsRemsKGMr1PRH0wcdUxNGJA2JgSP2AUz+M 4rqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=+j0ny/Rz4CiPjURr/NWLpBLeO869cif25qD8wS+oZ5U=; b=mTRNhcCShQ3g/Ptlw0xLoe589UUHv5d0auja1D1QgpPPBHrJpRWPplTm993ButDNXp Su7K2YspbNy5c+FTwpX4EdtsU43g0asagbTx8i0TjrARDAE6vuF6RlYXOxu1lVKonP1q QbbIKzsTOxtbpIbj/vzC2knmS/snzTdn1giBXxY6Vr+liS7IG+5fu3cnEvEius2Kehvh 2N+l8z5X+VsoxjRZ0vBqkgPkrPtABAG6E2hkI7BeoZgU9rvjIsKKblbyXETThjTFo4YO wB3kMHvmzmXyBFuvSd9X4tU+ymw9ZOSoAgVGcYD9yi6FbGXJ5ZSISof1oBpvLQ4DpuUU IzSw== X-Gm-Message-State: ALyK8tJ58XT2z1hgbs/wDqyTFf/B9NHnGyVom3EMXyRWXhFAiiB1V97kbYz56AGRFdxb0g== X-Received: by 10.36.36.72 with SMTP id f69mr1267876ita.43.1465838780659; Mon, 13 Jun 2016 10:26:20 -0700 (PDT) Received: from macpro.pronoia.local (c-24-10-239-245.hsd1.ut.comcast.net. [24.10.239.245]) by smtp.gmail.com with ESMTPSA id e143sm6760424ita.22.2016.06.13.10.26.19 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 13 Jun 2016 10:26:19 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: Onexception and try catch block in camel. From: Quinn Stevenson In-Reply-To: <1465241495711-5783511.post@n5.nabble.com> Date: Mon, 13 Jun 2016 11:26:18 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1465241495711-5783511.post@n5.nabble.com> To: users@camel.apache.org X-Mailer: Apple Mail (2.3124) archived-at: Mon, 13 Jun 2016 17:26:27 -0000 I=E2=80=99d suggest you read the =E2=80=9CError Handling=E2=80=9D = chapter in =E2=80=9CCamel in Action=E2=80=9D - it covers onException = very well. For me, I use onException wherever possible - it allows me to use error = handlers and exception policies which make my life much easier, and it = separates the error handling logic from the routing logic. I=E2=80=99m = sure there are cases where you must resort to doTry, but I haven=E2=80=99t= had to. If you do need doTry, keep in mind that Camel=E2=80=99s = regular error handling no longer applies - you need to deal with = everything yourself. Hope that helps > On Jun 6, 2016, at 1:31 PM, ravi21588 wrote: >=20 > Hi All, > Onexception clause and try catch block both can be specified in with = in a > camel route. > Can you please let me know the difference and advantage of using one = upon > other. >=20 >=20 >=20 > -- > View this message in context: = http://camel.465427.n5.nabble.com/Onexception-and-try-catch-block-in-camel= -tp5783511.html > Sent from the Camel - Users mailing list archive at Nabble.com.