bodewig 00/06/26 03:47:37
Modified: src/main/org/apache/tools/ant/taskdefs Exec.java
Log:
Propagate a caught Exception inside the thrown BuildException.
Suggested by: Julien Couvreur <[EMAIL PROTECTED]>
Revision Changes Path
1.10 +2 -2
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Exec.java
Index: Exec.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Exec.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Exec.java 2000/04/01 14:25:07 1.9
+++ Exec.java 2000/06/26 10:47:36 1.10
@@ -97,7 +97,7 @@
command = "cmd /c cd " + dir + " && " + command;
} else {
String ant = project.getProperty("ant.home");
- if (ant == null) throw new BuildException("Property 'ant.home'
not found");
+ if (ant == null) throw new BuildException("Property 'ant.home'
not found", location);
String antRun = project.resolveFile(ant +
"/bin/antRun").toString();
command = antRun + " " + dir + " " + command;
@@ -141,7 +141,7 @@
project.log("Result: " + err, "exec", Project.MSG_ERR);
}
} catch (IOException ioe) {
- throw new BuildException("Error exec: " + command );
+ throw new BuildException("Error exec: " + command, ioe,
location);
} catch (InterruptedException ex) {}
return err;