aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/pagination/PageSequenceMaster.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/PageSequenceMaster.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/PageSequenceMaster.java')
-rw-r--r--src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java b/src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java
index a6713ad2f..bda91aa1d 100644
--- a/src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java
+++ b/src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java
@@ -21,15 +21,13 @@ package org.apache.fop.fo.pagination;
// Java
import java.util.List;
-// XML
import org.xml.sax.Locator;
-import org.xml.sax.SAXParseException;
-// FOP
-import org.apache.fop.fo.FObj;
+import org.apache.fop.apps.FOPException;
import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FObj;
import org.apache.fop.fo.PropertyList;
-import org.apache.fop.apps.FOPException;
+import org.apache.fop.fo.ValidationException;
/**
* The page-sequence-master formatting object.
@@ -63,14 +61,14 @@ public class PageSequenceMaster extends FObj {
/**
* @see org.apache.fop.fo.FObj#bind(PropertyList)
*/
- public void bind(PropertyList pList) {
+ public void bind(PropertyList pList) throws FOPException {
masterName = pList.get(PR_MASTER_NAME).getString();
}
/**
* @see org.apache.fop.fo.FONode#startOfNode()
*/
- protected void startOfNode() throws SAXParseException {
+ protected void startOfNode() throws FOPException {
subSequenceSpecifiers = new java.util.ArrayList();
if (parent.getName().equals("fo:layout-master-set")) {
this.layoutMasterSet = (LayoutMasterSet)parent;
@@ -81,7 +79,7 @@ public class PageSequenceMaster extends FObj {
this.layoutMasterSet.addPageSequenceMaster(masterName, this);
}
} else {
- throw new SAXParseException("fo:page-sequence-master must be child "
+ throw new ValidationException("fo:page-sequence-master must be child "
+ "of fo:layout-master-set, not "
+ parent.getName(), locator);
}
@@ -90,7 +88,7 @@ public class PageSequenceMaster extends FObj {
/**
* @see org.apache.fop.fo.FONode#endOfNode()
*/
- protected void endOfNode() throws SAXParseException {
+ protected void endOfNode() throws FOPException {
if (childNodes == null) {
missingChildElementError("(single-page-master-reference|" +
"repeatable-page-master-reference|repeatable-page-master-alternatives)+");
@@ -103,7 +101,7 @@ public class PageSequenceMaster extends FObj {
* repeatable-page-master-alternatives)+
*/
protected void validateChildNode(Locator loc, String nsURI, String localName)
- throws SAXParseException {
+ throws ValidationException {
if (nsURI == FO_URI) {
if (!localName.equals("single-page-master-reference")
&& !localName.equals("repeatable-page-master-reference")