diff --git a/src/java/org/apache/poi/hssf/eventmodel/HSSFEventFactory.java b/src/java/org/apache/poi/hssf/eventmodel/HSSFEventFactory.java index c935a60ed..a18ac3a4f 100644 --- a/src/java/org/apache/poi/hssf/eventmodel/HSSFEventFactory.java +++ b/src/java/org/apache/poi/hssf/eventmodel/HSSFEventFactory.java @@ -172,6 +172,8 @@ public class HSSFEventFactory throws IOException, HSSFUserException { short userCode = 0; + + short sid = 0; process: try { @@ -181,7 +183,6 @@ public class HSSFEventFactory while (bytesread > 0) { - short sid = 0; sid = LittleEndian.getShort(sidbytes); if ((rec != null) && (sid != ContinueRecord.sid)) @@ -238,7 +239,8 @@ public class HSSFEventFactory } catch (IOException e) { - throw new RecordFormatException("Error reading bytes"); + throw new RecordFormatException("Error reading bytes" + + "while processing record sid="+sid); } return userCode;