From 31bc9eb19093b5e7163090845a7e2235ed8a2ffd Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Thu, 16 Jul 2015 03:42:11 +0000 Subject: [PATCH] Report which actual record a failing sid represents git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1691310 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/poi/hssf/record/RecordInputStream.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/poi/hssf/record/RecordInputStream.java b/src/java/org/apache/poi/hssf/record/RecordInputStream.java index 9f0b16e184..831a3a1878 100644 --- a/src/java/org/apache/poi/hssf/record/RecordInputStream.java +++ b/src/java/org/apache/poi/hssf/record/RecordInputStream.java @@ -52,7 +52,8 @@ public final class RecordInputStream implements LittleEndianInput { public static final class LeftoverDataException extends RuntimeException { public LeftoverDataException(int sid, int remainingByteCount) { super("Initialisation of record 0x" + Integer.toHexString(sid).toUpperCase() - + " left " + remainingByteCount + " bytes remaining still to be read."); + + "(" + RecordFactory.getRecordClass(sid).getSimpleName() + ") left " + remainingByteCount + + " bytes remaining still to be read."); } } -- 2.39.5