From a5c33430c6e04172ab219455fdecf86eb9f63aae Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Mon, 18 Feb 2008 09:00:08 +0000 Subject: [PATCH] No stack traces with missing images. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@628652 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/fo/flow/ExternalGraphic.java | 3 +++ src/java/org/apache/fop/render/java2d/Java2DRenderer.java | 3 +++ src/java/org/apache/fop/render/pdf/PDFRenderer.java | 3 +++ 3 files changed, 9 insertions(+) diff --git a/src/java/org/apache/fop/fo/flow/ExternalGraphic.java b/src/java/org/apache/fop/fo/flow/ExternalGraphic.java index 03229e4c2..fdddf3918 100644 --- a/src/java/org/apache/fop/fo/flow/ExternalGraphic.java +++ b/src/java/org/apache/fop/fo/flow/ExternalGraphic.java @@ -19,6 +19,7 @@ package org.apache.fop.fo.flow; +import java.io.FileNotFoundException; import java.io.IOException; import org.xml.sax.Locator; @@ -78,6 +79,8 @@ public class ExternalGraphic extends AbstractGraphics { info = manager.getImageInfo(url, userAgent.getImageSessionContext()); } catch (ImageException e) { log.error("Image not available: " + e.getMessage()); + } catch (FileNotFoundException fnfe) { + log.error(fnfe.getMessage()); } catch (IOException ioe) { log.error("I/O error while loading image: " + ioe.getMessage()); } diff --git a/src/java/org/apache/fop/render/java2d/Java2DRenderer.java b/src/java/org/apache/fop/render/java2d/Java2DRenderer.java index 63d5ad04c..8442af229 100644 --- a/src/java/org/apache/fop/render/java2d/Java2DRenderer.java +++ b/src/java/org/apache/fop/render/java2d/Java2DRenderer.java @@ -35,6 +35,7 @@ import java.awt.image.BufferedImage; import java.awt.print.PageFormat; import java.awt.print.Printable; import java.awt.print.PrinterException; +import java.io.FileNotFoundException; import java.io.IOException; import java.io.OutputStream; import java.util.Iterator; @@ -929,6 +930,8 @@ public abstract class Java2DRenderer extends AbstractPathOrientedRenderer implem } catch (ImageException ie) { log.error("Error while processing image: " + (info != null ? info.toString() : uri), ie); + } catch (FileNotFoundException fnfe) { + log.error(fnfe.getMessage()); } catch (IOException ioe) { log.error("I/O error while processing image: " + (info != null ? info.toString() : uri), ioe); diff --git a/src/java/org/apache/fop/render/pdf/PDFRenderer.java b/src/java/org/apache/fop/render/pdf/PDFRenderer.java index 15ed6d98a..5b7dd840e 100644 --- a/src/java/org/apache/fop/render/pdf/PDFRenderer.java +++ b/src/java/org/apache/fop/render/pdf/PDFRenderer.java @@ -27,6 +27,7 @@ import java.awt.color.ICC_Profile; import java.awt.geom.AffineTransform; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; +import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -1754,6 +1755,8 @@ public class PDFRenderer extends AbstractPathOrientedRenderer { } catch (ImageException ie) { log.error("Error while processing image: " + (info != null ? info.toString() : uri), ie); + } catch (FileNotFoundException fnfe) { + log.error(fnfe.getMessage()); } catch (IOException ioe) { log.error("I/O error while processing image: " + (info != null ? info.toString() : uri), ioe); -- 2.39.5