]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Clarified error message if base is not an existing directory
authorSimon Pepping <spepping@apache.org>
Mon, 23 Feb 2009 20:29:43 +0000 (20:29 +0000)
committerSimon Pepping <spepping@apache.org>
Mon, 23 Feb 2009 20:29:43 +0000 (20:29 +0000)
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

index 58ae6e8e6fdf158a69772b9a5f78d4e36c7450b7..58f527abe3cd7f2f68ebf4e87f182467f4796e56 100644 (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;
     }