From: Andreas Beeker Date: Wed, 2 May 2018 17:29:24 +0000 (+0000) Subject: add additional exception info to failing IOUtils.toByteArray X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=17fdb3188ce5025f2cee2082b961e24abf4f7b9a;p=poi.git add additional exception info to failing IOUtils.toByteArray git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1830779 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/poi/util/IOUtils.java b/src/java/org/apache/poi/util/IOUtils.java index c6bf8bd2ef..523f7c7de9 100644 --- a/src/java/org/apache/poi/util/IOUtils.java +++ b/src/java/org/apache/poi/util/IOUtils.java @@ -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();