From 3ab1679f073614c33222d754d7e333aa26c9acfe Mon Sep 17 00:00:00 2001 From: Simon Pepping Date: Mon, 23 Feb 2009 20:29:43 +0000 Subject: [PATCH] Clarified error message if base is not an existing directory git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@747126 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/apps/FOURIResolver.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/java/org/apache/fop/apps/FOURIResolver.java b/src/java/org/apache/fop/apps/FOURIResolver.java index 58ae6e8e6..58f527abe 100644 --- a/src/java/org/apache/fop/apps/FOURIResolver.java +++ b/src/java/org/apache/fop/apps/FOURIResolver.java @@ -77,10 +77,15 @@ public class FOURIResolver implements javax.xml.transform.URIResolver { try { base = (dir.isDirectory() ? dir.toURI().toURL() : new URL(base)).toExternalForm(); } catch (MalformedURLException mfue) { + String message = mfue.getMessage(); + if (!dir.isDirectory()) { + message = "base " + base + " is not a directory and not a valid URL: " + message; + mfue = new MalformedURLException(message); + } if (throwExceptions) { throw mfue; - } - log.error(mfue.getMessage()); + } + log.error(message); } return base; } -- 2.39.5