Make the exception a bit more explicit about what is wrong

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1424281 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2012-12-20 03:54:42 +00:00
parent 506578f1af
commit 21abfa9536

View File

@ -136,10 +136,11 @@ public final class HeaderBlock implements HeaderBlockConstants {
+ "POI only supports BIFF8 format"); + "POI only supports BIFF8 format");
} }
// Give a generic error // Give a generic error if the OLE2 signature isn't found
throw new IOException("Invalid header signature; read " throw new IOException("Invalid header signature; read "
+ longToHex(signature) + ", expected " + longToHex(signature) + ", expected "
+ longToHex(_signature)); + longToHex(_signature) + " - Your file appears "
+ "not to be a valid OLE2 document");
} }