]> source.dussan.org Git - poi.git/commitdiff
Make the exception a bit more explicit about what is wrong
authorNick Burch <nick@apache.org>
Thu, 20 Dec 2012 03:54:42 +0000 (03:54 +0000)
committerNick Burch <nick@apache.org>
Thu, 20 Dec 2012 03:54:42 +0000 (03:54 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1424281 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/poifs/storage/HeaderBlock.java

index 5b9e071d6c6f496391919a826f3d9587bfda7f66..fc76c26ddc8095b6bd9c827ab91d4b5cdedc58fb 100644 (file)
@@ -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");
                }