ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant Main.java
Date Wed, 12 Jun 2002 15:07:33 GMT
bodewig     2002/06/12 08:07:33

  Modified:    src/main/org/apache/tools/ant Main.java
  Log:
  Don't catch stuff thrown in System.exit
  
  PR: 9414
  
  Revision  Changes    Path
  1.67      +4 -3      jakarta-ant/src/main/org/apache/tools/ant/Main.java
  
  Index: Main.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/Main.java,v
  retrieving revision 1.66
  retrieving revision 1.67
  diff -u -r1.66 -r1.67
  --- Main.java	1 Jun 2002 12:26:37 -0000	1.66
  +++ Main.java	12 Jun 2002 15:07:33 -0000	1.67
  @@ -191,18 +191,18 @@
               }
           }
   
  +        // expect the worst
  +        int exitCode = 1;
           try {
               m.runBuild(coreLoader);
  -            System.exit(0);
  +            exitCode = 0;
           } catch (BuildException be) {
               if (m.err != System.err) {
                   printMessage(be);
               }
  -            System.exit(1);
           } catch (Throwable exc) {
               exc.printStackTrace();
               printMessage(exc);
  -            System.exit(1);
           } finally {
               if (isLogFileUsed) {
                   if (out != null) {
  @@ -221,6 +221,7 @@
                   }
               }
           }
  +        System.exit(exitCode);
       }
   
       /**
  
  
  

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


Mime
View raw message