File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/main/java/com/ning/http/multipart Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -50,10 +50,14 @@ public FilePartSource(File file) throws FileNotFoundException {
50
50
this .file = file ;
51
51
if (file != null ) {
52
52
if (!file .isFile ()) {
53
- throw new FileNotFoundException ("File is not a normal file." );
53
+ final String errorMessage =
54
+ String .format ("File is not a normal file (%s)." , file .getAbsolutePath ());
55
+ throw new FileNotFoundException (errorMessage );
54
56
}
55
57
if (!file .canRead ()) {
56
- throw new FileNotFoundException ("File is not readable." );
58
+ final String errorMessage =
59
+ String .format ("File is not readable (%s)." , file .getAbsolutePath ());
60
+ throw new FileNotFoundException (errorMessage );
57
61
}
58
62
this .fileName = file .getName ();
59
63
}
You can’t perform that action at this time.
0 commit comments