pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1642356 - /pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/exception/ValidationException.java
Date Fri, 28 Nov 2014 20:02:06 GMT
Author: tilman
Date: Fri Nov 28 20:02:06 2014
New Revision: 1642356

URL: http://svn.apache.org/r1642356
Log:
PDFBOX-2529: hold the page number in the ValidationException

Modified:
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/exception/ValidationException.java

Modified: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/exception/ValidationException.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/exception/ValidationException.java?rev=1642356&r1=1642355&r2=1642356&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/exception/ValidationException.java
(original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/exception/ValidationException.java
Fri Nov 28 20:02:06 2014
@@ -30,6 +30,15 @@ public class ValidationException extends
      * serial version number
      */
     private static final long serialVersionUID = -1616141241190424669L;
+    
+    protected Integer pageNumber = null;
+
+    public ValidationException(String message, Throwable cause, Integer pageNumber)
+    {
+        super(message);
+        initCause(cause);
+        this.pageNumber = pageNumber;
+    }
 
     public ValidationException(String message, Throwable cause)
     {
@@ -48,4 +57,11 @@ public class ValidationException extends
         initCause(cause);
     }
 
-}
+    /**
+     * Returns the page number related to the exception, or null if not known.
+     */
+    public Integer getPageNumber()
+    {
+        return pageNumber;
+    }
+}
\ No newline at end of file



Mime
View raw message