git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@747126
13f79535-47bb-0310-9956-
ffa450edef68
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;
}