aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/pagination/Region.java
diff options
context:
space:
mode:
authorFinn Bock <bckfnn@apache.org>2004-10-28 10:00:25 +0000
committerFinn Bock <bckfnn@apache.org>2004-10-28 10:00:25 +0000
commitb0e76bca6ec366023f5f98d8e07aa77dbfabafe1 (patch)
treeffd62fd750c33c6083daad85feb38a5dbd709de8 /src/java/org/apache/fop/fo/pagination/Region.java
parent13fdba00ab86701f8e0b4057ecc5bc36375c8ee0 (diff)
downloadxmlgraphics-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/pagination/Region.java')
-rw-r--r--src/java/org/apache/fop/fo/pagination/Region.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/java/org/apache/fop/fo/pagination/Region.java b/src/java/org/apache/fop/fo/pagination/Region.java
index 35da2f03b..c92404c77 100644
--- a/src/java/org/apache/fop/fo/pagination/Region.java
+++ b/src/java/org/apache/fop/fo/pagination/Region.java
@@ -20,16 +20,15 @@ package org.apache.fop.fo.pagination;
import java.awt.Rectangle;
-// XML
import org.xml.sax.Locator;
-import org.xml.sax.SAXParseException;
-// FOP
+import org.apache.fop.apps.FOPException;
import org.apache.fop.datatypes.FODimension;
import org.apache.fop.datatypes.Numeric;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
import org.apache.fop.fo.PropertyList;
+import org.apache.fop.fo.ValidationException;
import org.apache.fop.fo.properties.CommonBorderPaddingBackground;
/**
@@ -59,7 +58,7 @@ public abstract class Region extends FObj {
/**
* @see org.apache.fop.fo.FObj#bind(PropertyList)
*/
- public void bind(PropertyList pList) throws SAXParseException {
+ public void bind(PropertyList pList) throws FOPException {
commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
// clip = pList.get(PR_CLIP);
displayAlign = pList.get(PR_DISPLAY_ALIGN).getEnum();
@@ -75,7 +74,7 @@ public abstract class Region extends FObj {
// check that name is OK. Not very pretty.
if (isReserved(getRegionName())
&& !getRegionName().equals(getDefaultRegionName())) {
- throw new SAXParseException("region-name '" + regionName
+ throw new ValidationException("region-name '" + regionName
+ "' for " + this.getName()
+ " is not permitted.", locator);
}
@@ -87,7 +86,7 @@ public abstract class Region extends FObj {
* XSL Content Model: empty
*/
protected void validateChildNode(Locator loc, String nsURI, String localName)
- throws SAXParseException {
+ throws ValidationException {
invalidChildError(loc, nsURI, localName);
}