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 F29DE19000 for ; Fri, 31 Jul 2015 10:34:51 +0000 (UTC) Received: (qmail 67753 invoked by uid 500); 31 Jul 2015 10:34:51 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 67702 invoked by uid 500); 31 Jul 2015 10:34:51 -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 67690 invoked by uid 99); 31 Jul 2015 10:34:51 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Jul 2015 10:34:51 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id DD15E1A93D8 for ; Fri, 31 Jul 2015 10:34:50 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.214 X-Spam-Level: * X-Spam-Status: No, score=1.214 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, URIBL_BLOCKED=0.001, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id v8qSzONjkKc6 for ; Fri, 31 Jul 2015 10:34:38 +0000 (UTC) Received: from mail-ig0-f182.google.com (mail-ig0-f182.google.com [209.85.213.182]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 9C515205B8 for ; Fri, 31 Jul 2015 10:34:37 +0000 (UTC) Received: by igk11 with SMTP id 11so29217595igk.1 for ; Fri, 31 Jul 2015 03:34:30 -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=Uk3dE3xjRBxBk50dj8WP9YAtL2HBbJaRjzBAJFnnEaI=; b=lXBsS2ULDwfdRZG6BAQzcaaSFapKKqQKmhLQLXVbdDPJQ8K/GvWfk0wC+1Z/Y8ezok ytBJrwk72bV5XmMqUrjtZqdJUDBlj0dXyHLN0dR1zKSXXxALiWlQLY/mzO4iKwuogLUQ zKdjJUC+qezFCkCkMwGQbmaVzvGZkOQsACym/TkEqlCrWEZZP49uXjP/7Go5Wv2hUkV3 hH+MrYbWaNUpMJjVDfh+OZH1++QZFgpod/j8fr+X0H9lAjAaj2VA3GTb1wZNfT0Jw7nh BKYgslv6cwJWCXuUsFXNJM9y2zNpFuuhA/PRt6iYuZ8enZAEBLPvkRv2S82/lQ7bwMMq Th0Q== X-Received: by 10.50.87.38 with SMTP id u6mr4460911igz.39.1438338870071; Fri, 31 Jul 2015 03:34:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.76.201 with HTTP; Fri, 31 Jul 2015 03:34:10 -0700 (PDT) In-Reply-To: <1438258666235-5770104.post@n5.nabble.com> References: <1438258666235-5770104.post@n5.nabble.com> From: Claus Ibsen Date: Fri, 31 Jul 2015 12:34:10 +0200 Message-ID: Subject: Re: Throwing exception in a "loop" To: "users@camel.apache.org" Content-Type: text/plain; charset=UTF-8 Yeah we fixed this recently so the loop will break out sooner now. Will be in the next release. On Thu, Jul 30, 2015 at 2:17 PM, clinton wrote: > I'm using Spring DSL > I coded a "loop", to handle a retry situation. > Once the function is complete, I wanted to break out, so I setup an > exception, which I "threw" from within the loop, thinking that would break > me out. > I'm getting results I can't really interpret. I appears that somehow the > loop, or parts thereof continue to execute until the loop count is > exhausted, and THEN control transfers to the doCatch for the exception. > Does this approach just not work?? > > > > -- > View this message in context: http://camel.465427.n5.nabble.com/Throwing-exception-in-a-loop-tp5770104.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2nd edition: http://www.manning.com/ibsen2