]> source.dussan.org Git - poi.git/commitdiff
add additional exception info to failing IOUtils.toByteArray
authorAndreas Beeker <kiwiwings@apache.org>
Wed, 2 May 2018 17:29:24 +0000 (17:29 +0000)
committerAndreas Beeker <kiwiwings@apache.org>
Wed, 2 May 2018 17:29:24 +0000 (17:29 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1830779 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/util/IOUtils.java

index c6bf8bd2ef047a7c7dc647e8b1ee528bd740be59..523f7c7de9bcd322d9718609c60f7b4ce7289fcc 100644 (file)
@@ -166,7 +166,7 @@ public final class IOUtils {
         }
 
         if (len != Integer.MAX_VALUE && totalBytes < len) {
-            throw new EOFException("unexpected EOF");
+            throw new EOFException("unexpected EOF - expected len: "+len+" - actual len: "+totalBytes);
         }
 
         return baos.toByteArray();