pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1601377 - /pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java
Date Mon, 09 Jun 2014 13:38:11 GMT
Author: tilman
Date: Mon Jun  9 13:38:10 2014
New Revision: 1601377

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

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

Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java?rev=1601377&r1=1601376&r2=1601377&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java
(original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java
Mon Jun  9 13:38:10 2014
@@ -697,8 +697,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());
             }
         }
 
@@ -1615,7 +1615,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