]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
throws a different error if base dir not specified
authorKeiron Liddle <keiron@apache.org>
Thu, 11 Oct 2001 09:13:33 +0000 (09:13 +0000)
committerKeiron Liddle <keiron@apache.org>
Thu, 11 Oct 2001 09:13:33 +0000 (09:13 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194497 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/image/FopImageFactory.java

index 9a2650c0711eb49079a9370f7d52168d72b44f84..4e1ea97e660c661d17e47b9cf0248f468496ad4c 100644 (file)
@@ -76,6 +76,12 @@ public class FopImageFactory {
         } catch (Exception e) {
             // maybe relative
             URL context_url = null;
+            String base = Configuration.getStringValue("baseDir");
+            if(base == null) {
+                throw new FopImageException("Error with image URL: "
+                                             + e.getMessage()
+                                             + " and no base directory is specified");
+            }
             try {
                 absoluteURL = new URL(Configuration.getStringValue("baseDir")
                                       + absoluteURL.getFile());