pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1682734 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java
Date Sun, 31 May 2015 13:19:49 GMT
Author: tilman
Date: Sun May 31 13:19:48 2015
New Revision: 1682734

URL: http://svn.apache.org/r1682734
Log:
PDFBOX-2301: show offset in exception

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

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java?rev=1682734&r1=1682733&r2=1682734&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java Sun May
31 13:19:48 2015
@@ -1042,7 +1042,8 @@ public abstract class BaseParser impleme
             }
             else
             {
-                throw new IOException( "expected true actual='" + trueString + "' " + pdfSource
);
+                throw new IOException( "expected true actual='" + trueString + "' " + pdfSource
+ 
+                        "' at offset " + pdfSource.getPosition());
             }
             break;
         }
@@ -1055,7 +1056,8 @@ public abstract class BaseParser impleme
             }
             else
             {
-                throw new IOException( "expected false actual='" + falseString + "' " + pdfSource
);
+                throw new IOException( "expected false actual='" + falseString + "' " + pdfSource
+ 
+                        "' at offset " + pdfSource.getPosition());
             }
             break;
         }



Mime
View raw message