From: Nick Burch Date: Thu, 20 Dec 2012 03:54:42 +0000 (+0000) Subject: Make the exception a bit more explicit about what is wrong X-Git-Tag: 3.10-beta1~75 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=20f20b04dd04576fb7e1fd18289d2b2a18cadd97;p=poi.git 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 --- diff --git a/src/java/org/apache/poi/poifs/storage/HeaderBlock.java b/src/java/org/apache/poi/poifs/storage/HeaderBlock.java index 5b9e071d6c..fc76c26ddc 100644 --- a/src/java/org/apache/poi/poifs/storage/HeaderBlock.java +++ b/src/java/org/apache/poi/poifs/storage/HeaderBlock.java @@ -136,10 +136,11 @@ public final class HeaderBlock implements HeaderBlockConstants { + "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 " + longToHex(signature) + ", expected " - + longToHex(_signature)); + + longToHex(_signature) + " - Your file appears " + + "not to be a valid OLE2 document"); }