bodewig 2003/10/29 07:03:12
Modified: src/main/org/apache/tools/ant/taskdefs/optional/ssh Tag:
ANT_16_BRANCH SSHExec.java
Log:
Merge from HEAD
Revision Changes Path
No revision
No revision
1.9.2.2 +11 -3
ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java
Index: SSHExec.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java,v
retrieving revision 1.9.2.1
retrieving revision 1.9.2.2
diff -u -r1.9.2.1 -r1.9.2.2
--- SSHExec.java 24 Oct 2003 08:49:53 -0000 1.9.2.1
+++ SSHExec.java 29 Oct 2003 15:03:12 -0000 1.9.2.2
@@ -209,7 +209,11 @@
if (thread.isAlive()) {
// ran out of time
thread = null;
- log(TIMEOUT_MESSAGE, Project.MSG_ERR);
+ if (getFailonerror()) {
+ throw new BuildException(TIMEOUT_MESSAGE);
+ } else {
+ log(TIMEOUT_MESSAGE, Project.MSG_ERR);
+ }
} else {
// completed successfully
if (outputProperty != null) {
@@ -235,7 +239,11 @@
throw e;
} catch (JSchException e) {
if (e.getMessage().indexOf("session is down") >= 0) {
- log(TIMEOUT_MESSAGE, Project.MSG_ERR);
+ if (getFailonerror()) {
+ throw new BuildException(TIMEOUT_MESSAGE, e);
+ } else {
+ log(TIMEOUT_MESSAGE, Project.MSG_ERR);
+ }
} else {
if (getFailonerror()) {
throw new BuildException(e);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]