pdfbox-commits mailing list archives

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

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

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

Modified: pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageTree.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageTree.java?rev=1862628&r1=1862627&r2=1862628&view=diff
==============================================================================
--- pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageTree.java
(original)
+++ pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageTree.java
Fri Jul  5 18:03:16 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