ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r433701 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Java.java
Date Tue, 22 Aug 2006 17:19:47 GMT
Author: stevel
Date: Tue Aug 22 10:19:46 2006
New Revision: 433701

URL: http://svn.apache.org/viewvc?rev=433701&view=rev
Log:
Pre-beta commits of some local changes I've had on my system. 

here, java returns the exit code in an exit status exception, which extends BuildException.
This lets tasks that want a particular exit code catch it and filter out values.

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

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Java.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Java.java?rev=433701&r1=433700&r2=433701&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Java.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Java.java Tue Aug 22 10:19:46 2006
@@ -26,6 +26,7 @@
 import org.apache.tools.ant.ExitException;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.Task;
+import org.apache.tools.ant.ExitStatusException;
 import org.apache.tools.ant.types.Commandline;
 import org.apache.tools.ant.types.CommandlineJava;
 import org.apache.tools.ant.types.Environment;
@@ -100,7 +101,9 @@
             err = executeJava();
             if (err != 0) {
                 if (failOnError) {
-                    throw new BuildException("Java returned: " + err, getLocation());
+                    throw new ExitStatusException("Java returned: " + err,
+                            err,
+                            getLocation());
                 } else {
                     log("Java Result: " + err, Project.MSG_ERR);
                 }



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


Mime
View raw message