Author: centic
Date: Thu Jan 7 06:52:46 2021
New Revision: 1885227
URL: http://svn.apache.org/viewvc?rev=1885227&view=rev
Log:
Improve EmptyFileException when the file actually does not exist at all
Modified:
poi/trunk/src/java/org/apache/poi/EmptyFileException.java
Modified: poi/trunk/src/java/org/apache/poi/EmptyFileException.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/EmptyFileException.java?rev=1885227&r1=1885226&r2=1885227&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/EmptyFileException.java (original)
+++ poi/trunk/src/java/org/apache/poi/EmptyFileException.java Thu Jan 7 06:52:46 2021
@@ -29,6 +29,8 @@ public class EmptyFileException extends
}
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");
}
}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org
|