Browse Source

<scp> task didn't report build file location when a remote operation failed

Bugzilla Report 48578.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@901218 13f79535-47bb-0310-9956-ffa450edef68
master
Steve Loughran 15 years ago
parent
commit
f3502267e5
2 changed files with 12 additions and 1 deletions
  1. +3
    -0
      WHATSNEW
  2. +9
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java

+ 3
- 0
WHATSNEW View File

@@ -16,6 +16,9 @@ Fixed bugs:
the jarjar links task and protentially other third-party subclasses the jarjar links task and protentially other third-party subclasses
as well. as well.
Bugzilla Report 48541. Bugzilla Report 48541.
* <scp> task didn't report build file location when a remote operation failed
Bugzilla Report 48578.


Other changes: Other changes:
-------------- --------------


+ 9
- 1
src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java View File

@@ -235,7 +235,15 @@ public class Scp extends SSHBase {
} }
} catch (Exception e) { } catch (Exception e) {
if (getFailonerror()) { if (getFailonerror()) {
throw new BuildException(e);
if(e instanceof BuildException) {
BuildException be = (BuildException) e;
if(be.getLocation() == null) {
be.setLocation(getLocation());
}
throw be;
} else {
throw new BuildException(e);
}
} else { } else {
log("Caught exception: " + e.getMessage(), Project.MSG_ERR); log("Caught exception: " + e.getMessage(), Project.MSG_ERR);
} }


Loading…
Cancel
Save