geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r532931 - in /geronimo/sandbox/build-support/harness/trunk: build.xml src/main/java/ReLauncher.java
Date Fri, 27 Apr 2007 02:09:13 GMT
Author: jdillon
Date: Thu Apr 26 19:09:12 2007
New Revision: 532931

URL: http://svn.apache.org/viewvc?view=rev&rev=532931
Log:
Try to keep that damn IllegalThreadStateException from causing problems... maybe this will
work

Modified:
    geronimo/sandbox/build-support/harness/trunk/build.xml
    geronimo/sandbox/build-support/harness/trunk/src/main/java/ReLauncher.java

Modified: geronimo/sandbox/build-support/harness/trunk/build.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/build-support/harness/trunk/build.xml?view=diff&rev=532931&r1=532930&r2=532931
==============================================================================
--- geronimo/sandbox/build-support/harness/trunk/build.xml (original)
+++ geronimo/sandbox/build-support/harness/trunk/build.xml Thu Apr 26 19:09:12 2007
@@ -56,6 +56,7 @@
         <javac srcdir="${basedir}/src/main/java"
                destdir="${target.dir}/classes"
                source="1.4"
+               debug="true"
                classpathref="compile.libs">
         </javac>
         

Modified: geronimo/sandbox/build-support/harness/trunk/src/main/java/ReLauncher.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/build-support/harness/trunk/src/main/java/ReLauncher.java?view=diff&rev=532931&r1=532930&r2=532931
==============================================================================
--- geronimo/sandbox/build-support/harness/trunk/src/main/java/ReLauncher.java (original)
+++ geronimo/sandbox/build-support/harness/trunk/src/main/java/ReLauncher.java Thu Apr 26
19:09:12 2007
@@ -25,13 +25,26 @@
  */
 public class ReLauncher
 {
-    public static void main(final String[] args) throws Exception {
+    private static void exit(int exitCode) {
         try {
-            org.codehaus.classworlds.Launcher.main(args);
+            System.exit(exitCode);
         }
         catch (IllegalThreadStateException e) {
-            System.err.println("WARN: " + e + "; (ignoring)");
+            e.printStackTrace();
+            Runtime.getRuntime().halt(exitCode);
+        }
+    }
+    
+    public static void main(final String[] args) throws Exception {
+        int exitCode = 100;
+        
+        try {
+            exitCode = org.codehaus.classworlds.Launcher.mainWithExitCode(args);
+        }
+        catch (Exception e) {
             e.printStackTrace();
         }
+        
+        exit(exitCode);
     }
 }



Mime
View raw message