ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r416182 - /ant/core/trunk/src/main/org/apache/tools/ant/Main.java
Date Thu, 22 Jun 2006 00:07:28 GMT
Author: stevel
Date: Wed Jun 21 17:07:27 2006
New Revision: 416182

URL: http://svn.apache.org/viewvc?rev=416182&view=rev
Log:
Little something to make it easier for things that subclass main to change its exit behaviour.
Its been on my HDD for a while. If people object to it, I'll roll it back, as its not anything
I'm actively using...

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/Main.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/Main.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/Main.java?rev=416182&r1=416181&r2=416182&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/Main.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/Main.java Wed Jun 21 17:07:27 2006
@@ -176,7 +176,8 @@
         } catch (Throwable exc) {
             handleLogfile();
             printMessage(exc);
-            System.exit(1);
+            exit(1);
+            return;
         }
 
         if (additionalUserProperties != null) {
@@ -210,6 +211,16 @@
         } finally {
             handleLogfile();
         }
+        exit(exitCode);
+    }
+
+    /**
+     * This operation is expected to call {@link System#exit(int)}, which 
+     * is what the base version does. however, the option to do something
+     * different is there. 
+     * @param exitCode code to exit with
+     */
+    protected void exit(int exitCode) {
         System.exit(exitCode);
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message