aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Coffman <gears@apache.org>2000-11-29 21:42:56 +0000
committerSteve Coffman <gears@apache.org>2000-11-29 21:42:56 +0000
commite3a6577505b47001dc53d2ff8a6b53f78823db38 (patch)
tree970e75f1388f1ec0dbfd9d239723e636aa54e263
parentea94301ad7c0378bb9ade3f068f5ac8045b5a4ae (diff)
downloadxmlgraphics-fop-e3a6577505b47001dc53d2ff8a6b53f78823db38.tar.gz
xmlgraphics-fop-e3a6577505b47001dc53d2ff8a6b53f78823db38.zip
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
-rw-r--r--src/org/apache/fop/fo/pagination/LayoutMasterSet.java18
1 files 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());