pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1601378 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java
Date Mon, 09 Jun 2014 13:38:28 GMT
Author: tilman
Date: Mon Jun  9 13:38:27 2014
New Revision: 1601378

URL: http://svn.apache.org/r1601378
Log:
PDFBOX-908: improve error messages

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java?rev=1601378&r1=1601377&r2=1601378&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java
Mon Jun  9 13:38:27 2014
@@ -695,8 +695,8 @@ public class NonSequentialPDFParser exte
         {
             if (pdfSource.read() != c)
             {
-                throw new IOException("Expected pattern '" + new String(pattern) + " but
missed at character '" + c
-                        + "'");
+                throw new IOException("Expected pattern '" + new String(pattern) + "' but
missed at character '" + c
+                        + "' at offset " + pdfSource.getOffset());
             }
         }
 
@@ -1562,7 +1562,7 @@ public class NonSequentialPDFParser exte
             if (!endStream.equals("endstream"))
             {
                 throw new IOException("Error reading stream using length value. Expected='endstream'
actual='"
-                        + endStream + "' ");
+                        + endStream + "' at offset " + pdfSource.getOffset());
             }
         }
         finally



Mime
View raw message