Bugzilla Report 48578. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@901218 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -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: | ||||
| -------------- | -------------- | ||||
| @@ -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); | ||||
| } | } | ||||