Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 42255 invoked from network); 21 May 2007 06:29:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 May 2007 06:29:30 -0000 Received: (qmail 19450 invoked by uid 500); 21 May 2007 06:29:35 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 19418 invoked by uid 500); 21 May 2007 06:29:35 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 19407 invoked by uid 99); 21 May 2007 06:29:35 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 May 2007 23:29:35 -0700 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [193.109.238.66] (HELO dnsinet.rzf-nrw.de) (193.109.238.66) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 May 2007 23:29:28 -0700 Received: from z011100.bk.fin.local (z011100.bk.fin.local [172.18.101.140]) by dnsinet.rzf-nrw.de (8.14.0/8.14.0) with ESMTP id l4L6T5DK022046 for ; Mon, 21 May 2007 08:29:05 +0200 Received: from z011034.bk.fin.local ([130.11.7.34]) by z011100.bk.fin.local with Microsoft SMTPSVC(6.0.3790.0); Mon, 21 May 2007 08:29:01 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: AW: Retry task available in svn head Date: Mon, 21 May 2007 08:29:01 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Retry task available in svn head Thread-Index: AceZ77mUw40yB2+ORJCLlRVphQY6qABfSwbw From: To: X-OriginalArrivalTime: 21 May 2007 06:29:01.0643 (UTC) FILETIME=[523911B0:01C79B71] X-Virus-Checked: Checked by ClamAV on apache.org >+ } catch (Exception e) { >+ if (i+ log("Attempt ["+i+"] error occured, retrying...", e, Project.MSG_INFO); >+ } else { >+ throw new BuildException("Task ["+nestedTask.getTaskName()+"] failed after ["+retryCount+"] attempts, giving up"); >+ } >+ } > >I do not know very much about ant exception handling in general. >So it seems to me that e is lost in some cases and I think it=20 >is not a good idea. Would this be more useful? public void execute() throws BuildException { StringBuffer errorMessages =3D new StringBuffer(); for(int i=3D0; i<=3DretryCount; i++) { try { nestedTask.perform(); break; } catch (Exception e) { if (i test-fail-and-retry: [get] Getting: http://iojasodjojaosdj [get] To: c:\temp\dest [get] Error getting http://iojasodjojaosdj to c:\temp\dest [retry] Attempt [0] error occured, retrying... [get] Getting: http://iojasodjojaosdj [get] To: c:\temp\dest [get] Error getting http://iojasodjojaosdj to c:\temp\dest [retry] Attempt [1] error occured, retrying... [get] Getting: http://iojasodjojaosdj [get] To: c:\temp\dest [get] Error getting http://iojasodjojaosdj to c:\temp\dest [retry] Attempt [2] error occured, retrying... [get] Getting: http://iojasodjojaosdj [get] To: c:\temp\dest [get] Error getting http://iojasodjojaosdj to c:\temp\dest BUILD FAILED C:\TEMP\retry-test.xml:9: Task [get] failed after [3] attempts, giving up. Error messages: java.net.UnknownHostException: iojasodjojaosdj java.net.UnknownHostException: iojasodjojaosdj java.net.UnknownHostException: iojasodjojaosdj java.net.UnknownHostException: iojasodjojaosdj Jan --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org