Author: msahyoun
Date: Thu Feb 22 11:19:01 2018
New Revision: 1825047

URL: http://svn.apache.org/viewvc?rev=1825047&view=rev
Log:
PDFBOX-4118: retain exception in log message; use LOG.debug for ignored 
exceptions

Modified:
    
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDDeviceNAttributes.java
    
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDDeviceNProcess.java
    
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDDeviceRGB.java
    
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/PatchMeshesShadingContext.java
    
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/Type4ShadingContext.java
    
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/Type5ShadingContext.java

Modified: 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDDeviceNAttributes.java
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDDeviceNAttributes.java?rev=1825047&r1=1825046&r2=1825047&view=diff
==============================================================================
--- 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDDeviceNAttributes.java
 (original)
+++ 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDDeviceNAttributes.java
 Thu Feb 22 11:19:01 2018
@@ -25,6 +25,9 @@ import java.io.IOException;
 import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 /**
  * Contains additional information about the components of colour space.
  * Instead of using the alternate color space and tint transform, conforming 
readers may use custom
@@ -34,6 +37,11 @@ import java.util.Map;
  */
 public final class PDDeviceNAttributes
 {
+    /**
+     * Log instance.
+     */
+    private static final Log LOG = 
LogFactory.getLog(PDDeviceNAttributes.class);
+
     private final COSDictionary dictionary;
 
     /**
@@ -150,6 +158,7 @@ public final class PDDeviceNAttributes
         }
         catch (IOException e)
         {
+            LOG.debug("Couldn't get the colorants information - returning 
'ERROR' instead'", e);
             sb.append("ERROR");
         }
         sb.append('}');

Modified: 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDDeviceNProcess.java
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDDeviceNProcess.java?rev=1825047&r1=1825046&r2=1825047&view=diff
==============================================================================
--- 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDDeviceNProcess.java
 (original)
+++ 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDDeviceNProcess.java
 Thu Feb 22 11:19:01 2018
@@ -25,6 +25,9 @@ import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 /**
  * A DeviceN Process Dictionary
  *
@@ -32,6 +35,11 @@ import java.util.List;
  */
 public class PDDeviceNProcess
 {
+    /**
+     * Log instance.
+     */
+    private static final Log LOG = LogFactory.getLog(PDDeviceNProcess.class);
+
     private final COSDictionary dictionary;
 
     /**
@@ -110,6 +118,7 @@ public class PDDeviceNProcess
         }
         catch (IOException e)
         {
+            LOG.debug("Couldn't get the colorants information - returning 
'ERROR' instead'", e);
             sb.append("ERROR");
         }
         sb.append('}');

Modified: 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDDeviceRGB.java
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDDeviceRGB.java?rev=1825047&r1=1825046&r2=1825047&view=diff
==============================================================================
--- 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDDeviceRGB.java
 (original)
+++ 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDDeviceRGB.java
 Thu Feb 22 11:19:01 2018
@@ -160,7 +160,7 @@ public final class PDDeviceRGB extends P
             }
             catch (ClassNotFoundException e)
             {
-                LOG.debug("KCMS doesn't exist anymore. SO SAD!");
+                LOG.debug("KCMS doesn't exist anymore. SO SAD!", e);
             }
         }
     }

Modified: 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/PatchMeshesShadingContext.java
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/PatchMeshesShadingContext.java?rev=1825047&r1=1825046&r2=1825047&view=diff
==============================================================================
--- 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/PatchMeshesShadingContext.java
 (original)
+++ 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/PatchMeshesShadingContext.java
 Thu Feb 22 11:19:01 2018
@@ -154,6 +154,7 @@ abstract class PatchMeshesShadingContext
                 }
                 catch (EOFException ex)
                 {
+                    LOG.debug("Couldn't get the patches information - stop 
reading", ex);
                     eof = true;
                 }
             }
@@ -231,7 +232,7 @@ abstract class PatchMeshesShadingContext
         }
         catch (EOFException ex)
         {
-            LOG.debug("EOF");
+            LOG.debug("EOF", ex);
             return null;
         }
         return generatePatch(points, color);

Modified: 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/Type4ShadingContext.java
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/Type4ShadingContext.java?rev=1825047&r1=1825046&r2=1825047&view=diff
==============================================================================
--- 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/Type4ShadingContext.java
 (original)
+++ 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/Type4ShadingContext.java
 Thu Feb 22 11:19:01 2018
@@ -155,6 +155,7 @@ class Type4ShadingContext extends Gourau
                 }
                 catch (EOFException ex)
                 {
+                    LOG.debug("Couldn't get the triangle information - stop 
reading", ex);
                     eof = true;
                 }
             }

Modified: 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/Type5ShadingContext.java
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/Type5ShadingContext.java?rev=1825047&r1=1825046&r2=1825047&view=diff
==============================================================================
--- 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/Type5ShadingContext.java
 (original)
+++ 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/Type5ShadingContext.java
 Thu Feb 22 11:19:01 2018
@@ -93,6 +93,7 @@ class Type5ShadingContext extends Gourau
                 }
                 catch (EOFException ex)
                 {
+                    LOG.debug("Couldn't get the triangle information - stop 
reading", ex);
                     eof = true;
                 }
             }


Reply via email to