From 1432c2b8b9b22d549e60e59f9dc2247a9a46e460 Mon Sep 17 00:00:00 2001 From: Karen Lease Date: Wed, 15 Nov 2000 23:13:50 +0000 Subject: [PATCH] Improve handling of property-related exceptions git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193819 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/fop/fo/PropertyListBuilder.java | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/org/apache/fop/fo/PropertyListBuilder.java b/src/org/apache/fop/fo/PropertyListBuilder.java index ddeaba833..d3c067fc0 100644 --- a/src/org/apache/fop/fo/PropertyListBuilder.java +++ b/src/org/apache/fop/fo/PropertyListBuilder.java @@ -138,13 +138,15 @@ public class PropertyListBuilder { */ String fontsizeval=attributes.getValue(FONTSIZEATTR); if (fontsizeval != null) { - // get a Property.Maker Property.Maker propertyMaker = findMaker(table, FONTSIZEATTR); if (propertyMaker != null) { - p.put(FONTSIZEATTR, propertyMaker.make(p,fontsizeval,fo)); - propsDone.append(FONTSIZEATTR + ' '); - } - } + try { + p.put(FONTSIZEATTR, propertyMaker.make(p,fontsizeval,fo)); + } catch (FOPException e) { } + } + // Put in the "done" list even if error or no Maker. + propsDone.append(FONTSIZEATTR + ' '); + } for (int i = 0; i < attributes.getLength(); i++) { String attributeName = attributes.getQName(i); @@ -166,6 +168,7 @@ public class PropertyListBuilder { Property.Maker propertyMaker =findMaker(table, propName); if (propertyMaker != null) { + try { if (subpropName != null) { Property baseProp = p.getExplicit(propName); if (baseProp == null) { @@ -183,13 +186,14 @@ public class PropertyListBuilder { else { propVal = propertyMaker.make(p,attributes.getValue(i),fo); } - if (propVal != null) { p.put(propName,propVal); } - + } catch (FOPException e) { /* Do other props. */ } } else { - //MessageHandler.errorln("WARNING: property " + attributeName + " ignored"); + if (! attributeName.startsWith("xmlns")) + MessageHandler.errorln("WARNING: property '" + + attributeName + "' ignored"); } } -- 2.39.5