Skip to content

Commit 0f20fdb

Browse files
tiranalukeis
authored andcommitted
Add filename to IOException if file copy was failed.
* Add filename to IOException if file copy was failed. I got the IOException "Could not transfer all bytes" and found that there was no glue what wrong. filename may give a hint, at least. * Change error message change the error message - new version "Could not transfer all bytes from ... to ..."
1 parent 116adb8 commit 0f20fdb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/client/src/org/openqa/selenium/io/FileHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ private static void copyFile(File from, File to, Filter onlyCopy) throws IOExcep
191191
final long copied = Files.copy(from.toPath(), out);
192192
final long length = from.length();
193193
if (copied != length) {
194-
throw new IOException("Could not transfer all bytes.");
194+
throw new IOException("Could not transfer all bytes from " + from + " to " + to);
195195
}
196196
}
197197
}

0 commit comments

Comments
 (0)