]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Norm Walsh's enhanced error messages. :)
authorSteve Coffman <gears@apache.org>
Wed, 29 Nov 2000 21:42:56 +0000 (21:42 +0000)
committerSteve Coffman <gears@apache.org>
Wed, 29 Nov 2000 21:42:56 +0000 (21:42 +0000)
-Steve

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193850 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/fo/pagination/LayoutMasterSet.java

index a0bba54a68e23eb2b8cd38e4e72e150d9eb25fe0..d28672ac6a61d92d2d56ad482530bd891146c6b2 100644 (file)
@@ -102,7 +102,9 @@ public class LayoutMasterSet extends FObj {
                throws FOPException {
        // check against duplication of master-name
        if (existsName(simplePageMaster.getMasterName()))
-               throw new FOPException( "'master-name' must be unique" +
+               throw new FOPException( "'master-name' (" +
+                       simplePageMaster.getMasterName() +
+                       ") must be unique " +
                        "across page-masters and page-sequence-masters" );
        this.simplePageMasters.put(simplePageMaster.getMasterName(), simplePageMaster);
     }
@@ -116,7 +118,9 @@ public class LayoutMasterSet extends FObj {
                throws FOPException {
        // check against duplication of master-name     
        if (existsName(masterName))
-               throw new FOPException( "'master-name' must be unique " +
+               throw new FOPException( "'master-name' (" +
+                       masterName +
+                       ") must be unique " +
                        "across page-masters and page-sequence-masters" );
        this.pageSequenceMasters.put(masterName, pageSequenceMaster);
     }
@@ -155,8 +159,14 @@ public class LayoutMasterSet extends FObj {
                if (allRegions.containsKey(region.getRegionName())) {
                    String localClass = (String)allRegions.get(region.getRegionName());
                    if (!localClass.equals(region.getRegionClass())) {
-                       throw new FOPException("Duplicate region-names must map "
-                                              + "to the same region-class");
+                       throw new FOPException("Duplicate region-names (" +
+                                              region.getRegionName() +
+                                              ") must map "
+                                              + "to the same region-class ("
+                                              + localClass
+                                              + "!="
+                                              + region.getRegionClass()
+                                              + ")");
                    }
                }
                allRegions.put(region.getRegionName(),region.getRegionClass());