From 1e5697909eee991ac0ddb272f153406aa68379c9 Mon Sep 17 00:00:00 2001 From: Andreas Beeker Date: Wed, 2 May 2018 17:29:24 +0000 Subject: [PATCH] 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 --- src/java/org/apache/poi/util/IOUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();