diff options
author | Finn Bock <bckfnn@apache.org> | 2004-10-28 10:00:25 +0000 |
---|---|---|
committer | Finn Bock <bckfnn@apache.org> | 2004-10-28 10:00:25 +0000 |
commit | b0e76bca6ec366023f5f98d8e07aa77dbfabafe1 (patch) | |
tree | ffd62fd750c33c6083daad85feb38a5dbd709de8 /src/java/org/apache/fop/fo/expr/PropertyException.java | |
parent | 13fdba00ab86701f8e0b4057ecc5bc36375c8ee0 (diff) | |
download | xmlgraphics-fop-b0e76bca6ec366023f5f98d8e07aa77dbfabafe1.tar.gz xmlgraphics-fop-b0e76bca6ec366023f5f98d8e07aa77dbfabafe1.zip |
New exception hierarchy rooted in SAXException and throw clauses on
property parsing and retrieval.
PR: 31899
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198106 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/expr/PropertyException.java')
-rw-r--r-- | src/java/org/apache/fop/fo/expr/PropertyException.java | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/fo/expr/PropertyException.java b/src/java/org/apache/fop/fo/expr/PropertyException.java index 50a8c79e7..9ce3224b8 100644 --- a/src/java/org/apache/fop/fo/expr/PropertyException.java +++ b/src/java/org/apache/fop/fo/expr/PropertyException.java @@ -18,10 +18,13 @@ package org.apache.fop.fo.expr; +import org.apache.fop.apps.FOPException; + /** * Class for managing exceptions that are raised in Property processing. */ -public class PropertyException extends Exception { +public class PropertyException extends FOPException { + private String propertyName; /** * Constructor @@ -31,4 +34,24 @@ public class PropertyException extends Exception { super(detail); } + /** + */ + public void setPropertyInfo(PropertyInfo propInfo) { + setLocator(propInfo.getFO().locator); + propertyName = propInfo.getPropertyMaker().getName(); + } + + /** + */ + public void setPropertyName(String propertyName) { + this.propertyName = propertyName; + } + + public String getMessage() { + if (propertyName != null) { + return super.getMessage() + "; property:'" + propertyName + "'"; + } else { + return super.getMessage(); + } + } } |