improved the diagnosability.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@23882 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2009-11-20 01:49:03 +00:00
1 parent b6600a3fbd
commit 63e48ae865
1 file changed
+8 -4
+8 -4
View File
@@ -1261,11 +1261,15 @@ public final class FilePath implements Serializable {
* Copies this file to the specified target.
*/
public void copyTo(FilePath target) throws IOException, InterruptedException {
OutputStream out = target.write();
try {
copyTo(out);
} finally {
out.close();
OutputStream out = target.write();
try {
copyTo(out);
} finally {
out.close();
}
} catch (IOException e) {
throw new IOException2("Failed to copy "+this+" to "+target,e);
}
}