Return-Path: Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 40010 invoked from network); 23 Sep 2000 18:37:47 -0000 Received: from h-205-217-237-46.netscape.com (HELO netscape.com) (205.217.237.46) by locus.apache.org with SMTP; 23 Sep 2000 18:37:47 -0000 Received: from dredd.mcom.com (dredd.mcom.com [205.217.237.54]) by netscape.com (8.10.0/8.10.0) with ESMTP id e8NIQdC10547 for ; Sat, 23 Sep 2000 11:26:39 -0700 (PDT) Received: from [198.93.95.181] ([198.93.95.181]) by dredd.mcom.com (Netscape Messaging Server 4.15 dredd Jun 22 2000 16:29:39) with ESMTP id G1CRQ900.I2P for ; Sat, 23 Sep 2000 11:37:21 -0700 Mime-Version: 1.0 X-Sender: beard@dredd.mcom.com Message-Id: Date: Sat, 23 Sep 2000 11:37:17 -0700 To: ant-dev@jakarta.apache.org From: beard@netscape.com (Patrick Beard) Subject: [PATCH] Fix to Main.main()'s error message reporting. Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Under JShell, when a tool calls System.exit(), it gets a ThreadDeath exception. These exceptions never have a non-null message, so the code in Main.main() always prints "null" at the end. Here's a patch to fix that. Index: jakarta-ant/src/main/org/apache/tools/ant/Main.java =================================================================== RCS file: /home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/Main.java,v retrieving revision 1.20 diff -c -2 -r1.20 Main.java *** jakarta-ant/src/main/org/apache/tools/ant/Main.java 2000/09/19 09:09:23 1.20 --- jakarta-ant/src/main/org/apache/tools/ant/Main.java 2000/09/23 18:34:08 *************** *** 132,136 **** } catch(Throwable exc) { ! System.err.println(exc.getMessage()); System.exit(1); } --- 132,138 ---- } catch(Throwable exc) { ! String message = exc.getMessage(); ! if (message != null) ! System.err.println(message); System.exit(1); } -- // Patrick C. Beard // Java Runtime Enthusiast -- "Will invoke interfaces for food." // mailto:beard@netscape.com