pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1752181 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDType1Font.java
Date Mon, 11 Jul 2016 15:56:13 GMT
Author: tilman
Date: Mon Jul 11 15:56:13 2016
New Revision: 1752181

URL: http://svn.apache.org/viewvc?rev=1752181&view=rev
Log:
PDFBOX-3298: improve Exception message

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

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDType1Font.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDType1Font.java?rev=1752181&r1=1752180&r2=1752181&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDType1Font.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDType1Font.java Mon
Jul 11 15:56:13 2016
@@ -377,8 +377,8 @@ public class PDType1Font extends PDSimpl
         if (!encoding.contains(name))
         {
             throw new IllegalArgumentException(
-                    String.format("U+%04X ('%s') is not available in this font's encoding:
%s",
-                                  unicode, name, encoding.getEncodingName()));
+                    String.format("U+%04X ('%s') is not available in this font %s (generic:
%s) encoding: %s",
+                                  unicode, name, getName(), genericFont.getName(), encoding.getEncodingName()));
         }
         
         String nameInFont = getNameInFont(name);
@@ -387,7 +387,7 @@ public class PDType1Font extends PDSimpl
         if (nameInFont.equals(".notdef") || !genericFont.hasGlyph(nameInFont))
         {
             throw new IllegalArgumentException(
-                    String.format("No glyph for U+%04X in font %s", unicode, getName()));
+                    String.format("No glyph for U+%04X in font %s (generic: %s)", unicode,
getName(), genericFont.getName()));
         }
 
         int code = inverted.get(name);



Mime
View raw message