ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r901218 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java
Date Wed, 20 Jan 2010 14:41:44 GMT
Author: stevel
Date: Wed Jan 20 14:41:43 2010
New Revision: 901218

URL: http://svn.apache.org/viewvc?rev=901218&view=rev
Log:
<scp> task didn't report build file location when a remote operation failed
   Bugzilla Report 48578.

Modified:
    ant/core/trunk/WHATSNEW
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=901218&r1=901217&r2=901218&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Wed Jan 20 14:41:43 2010
@@ -16,6 +16,9 @@
    the jarjar links task and protentially other third-party subclasses
    as well.
    Bugzilla Report 48541.
+   
+ * <scp> task didn't report build file location when a remote operation failed
+   Bugzilla Report 48578.  
 
 Other changes:
 --------------

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java?rev=901218&r1=901217&r2=901218&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java Wed Jan 20
14:41:43 2010
@@ -235,7 +235,15 @@
             }
         } catch (Exception e) {
             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 {
                 log("Caught exception: " + e.getMessage(), Project.MSG_ERR);
             }



Mime
View raw message