aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Pepping <spepping@apache.org>2009-02-23 20:29:43 +0000
committerSimon Pepping <spepping@apache.org>2009-02-23 20:29:43 +0000
commit3ab1679f073614c33222d754d7e333aa26c9acfe (patch)
treea59d68d6019a1f81664edd63813c73d10cbf6d9c /src
parent35bce6e9b424663bddca283dcea9d72f6bbec0f7 (diff)
downloadxmlgraphics-fop-3ab1679f073614c33222d754d7e333aa26c9acfe.tar.gz
xmlgraphics-fop-3ab1679f073614c33222d754d7e333aa26c9acfe.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/java/org/apache/fop/apps/FOURIResolver.java9
1 files 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;
}