Browse Source

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
tags/fop-1_0
Simon Pepping 15 years ago
parent
commit
3ab1679f07
1 changed files with 7 additions and 2 deletions
  1. 7
    2
      src/java/org/apache/fop/apps/FOURIResolver.java

+ 7
- 2
src/java/org/apache/fop/apps/FOURIResolver.java View File

@@ -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;
}

Loading…
Cancel
Save