pdfbox-commits mailing list archives

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

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

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

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageTree.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageTree.java?rev=1862626&r1=1862625&r2=1862626&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageTree.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageTree.java Fri Jul  5
18:03:05 2019
@@ -293,11 +293,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
@@ -308,7 +308,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