]> source.dussan.org Git - poi.git/commitdiff
Report which actual record a failing sid represents
authorDominik Stadler <centic@apache.org>
Thu, 16 Jul 2015 03:42:11 +0000 (03:42 +0000)
committerDominik Stadler <centic@apache.org>
Thu, 16 Jul 2015 03:42:11 +0000 (03:42 +0000)
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

index 9f0b16e184fef9f614f034a99a9e7770bf9f20be..831a3a18781db3d370369328e93e1571e106acac 100644 (file)
@@ -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.");
                }
        }