pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1862629 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageTree.java
Date Fri, 05 Jul 2019 18:03:21 GMT
Author: tilman
Date: Fri Jul  5 18:03:21 2019
New Revision: 1862629

URL: http://svn.apache.org/viewvc?rev=1862629&view=rev
Log:
PDFBOX-4071: clarify exception message, see SO 56893774

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageTree.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageTree.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageTree.java?rev=1862629&r1=1862628&r2=1862629&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageTree.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageTree.java Fri
Jul  5 18:03:21 2019
@@ -295,11 +295,11 @@ public class PDPageTree implements COSOb
                     }
                 }
 
-                throw new IllegalStateException("Index not found: " + pageNum);
+                throw new IllegalStateException("1-based index not found: " + pageNum);
             }
             else
             {
-                throw new IndexOutOfBoundsException("Index out of bounds: " + pageNum);
+                throw new IndexOutOfBoundsException("1-based index out of bounds: " + pageNum);
             }
         }
         else
@@ -310,7 +310,7 @@ public class PDPageTree implements COSOb
             }
             else
             {
-                throw new IllegalStateException("Index not found: " + pageNum);
+                throw new IllegalStateException("1-based index not found: " + pageNum);
             }
         }
     }



Mime
View raw message