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 [EMAIL PROTECTED] 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to