diff options
Diffstat (limited to 'src/java/org/apache/fop/fo/expr/FromParentFunction.java')
-rw-r--r-- | src/java/org/apache/fop/fo/expr/FromParentFunction.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/fo/expr/FromParentFunction.java b/src/java/org/apache/fop/fo/expr/FromParentFunction.java index b5a82de56..b09d3c95f 100644 --- a/src/java/org/apache/fop/fo/expr/FromParentFunction.java +++ b/src/java/org/apache/fop/fo/expr/FromParentFunction.java @@ -64,7 +64,13 @@ public class FromParentFunction extends FunctionBase { * non-inherited properties too. Perhaps the result is different for * a property line line-height which "inherits specified"??? */ - return pInfo.getPropertyList().getFromParent(FOPropertyMapping.getPropertyId(propName)); + int propId = FOPropertyMapping.getPropertyId(propName); + if (propId < 0) { + throw new PropertyException( + "Unknown property name used with inherited-property-value function: " + + propName); + } + return pInfo.getPropertyList().getFromParent(propId); } } |