From e3a6577505b47001dc53d2ff8a6b53f78823db38 Mon Sep 17 00:00:00 2001 From: Steve Coffman Date: Wed, 29 Nov 2000 21:42:56 +0000 Subject: [PATCH] Norm Walsh's enhanced error messages. :) -Steve git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193850 13f79535-47bb-0310-9956-ffa450edef68 --- .../fop/fo/pagination/LayoutMasterSet.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/org/apache/fop/fo/pagination/LayoutMasterSet.java b/src/org/apache/fop/fo/pagination/LayoutMasterSet.java index a0bba54a6..d28672ac6 100644 --- a/src/org/apache/fop/fo/pagination/LayoutMasterSet.java +++ b/src/org/apache/fop/fo/pagination/LayoutMasterSet.java @@ -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()); -- 2.39.5