mirror of
https://github.com/apache/poi.git
synced 2025-03-06 00:49:36 +00:00
Improve EmptyFileException when the file actually does not exist at all
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885227 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
dde88b1102
commit
ce701485d8
@ -29,6 +29,8 @@ public class EmptyFileException extends IllegalArgumentException {
|
||||
}
|
||||
|
||||
public EmptyFileException(File file) {
|
||||
super("The supplied file '" + file.getAbsolutePath() + "' was empty (zero bytes long)");
|
||||
super(file.exists() ?
|
||||
"The supplied file '" + file.getAbsolutePath() + "' was empty (zero bytes long)" :
|
||||
"The file '" + file.getAbsolutePath() + "' does not exist");
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user