made the exception meaningful

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352802 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew C. Oliver 2002-07-21 13:08:18 +00:00
parent 7a29ad67cf
commit 57952b2fac
1 changed files with 4 additions and 2 deletions

View File

@ -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;