aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/pagination/PageSequence.java
diff options
context:
space:
mode:
authorGlen Mazza <gmazza@apache.org>2004-08-01 04:20:50 +0000
committerGlen Mazza <gmazza@apache.org>2004-08-01 04:20:50 +0000
commitaa569d642f3814a7e1242ade45cac003761914e6 (patch)
treee4a744514b1fd1bfd084c1cb0e36381c87dd447a /src/java/org/apache/fop/fo/pagination/PageSequence.java
parent07e8b67a4aedd53a69895a82f328b472c9a05a6e (diff)
downloadxmlgraphics-fop-aa569d642f3814a7e1242ade45cac003761914e6.tar.gz
xmlgraphics-fop-aa569d642f3814a7e1242ade45cac003761914e6.zip
1.) Moved from FOPException to SAXParseException for addProperties()
2.) FONode: locator object added, its three components (file, line, col) removed 3.) FONode: new attributeError() method created for attribute problems in input FO. 4.) Removed some setup() methods in the FO's, placed them in addProperties() instead. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197847 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/pagination/PageSequence.java')
-rw-r--r--src/java/org/apache/fop/fo/pagination/PageSequence.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/java/org/apache/fop/fo/pagination/PageSequence.java b/src/java/org/apache/fop/fo/pagination/PageSequence.java
index 3e37adcf5..9f1a7ee3d 100644
--- a/src/java/org/apache/fop/fo/pagination/PageSequence.java
+++ b/src/java/org/apache/fop/fo/pagination/PageSequence.java
@@ -27,6 +27,7 @@ import org.xml.sax.Locator;
import org.xml.sax.SAXParseException;
// FOP
+import org.apache.fop.apps.FOPException;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
import org.apache.fop.fo.FOElementMapping;
@@ -230,7 +231,7 @@ public class PageSequence extends FObj {
/**
* @see org.apache.fop.fo.FObj#addProperties
*/
- protected void addProperties(Attributes attlist) throws FOPException {
+ protected void addProperties(Attributes attlist) throws SAXParseException {
super.addProperties(attlist);
this.root = (Root) parent;
@@ -258,8 +259,8 @@ public class PageSequence extends FObj {
int pageStart = new Integer(ipnValue).intValue();
this.explicitFirstNumber = (pageStart > 0) ? pageStart : 1;
} catch (NumberFormatException nfe) {
- throw new FOPException("\"" + ipnValue
- + "\" is not a valid value for initial-page-number");
+ throw new SAXParseException("\"" + ipnValue
+ + "\" is not a valid value for initial-page-number", locator);
}
}
@@ -270,9 +271,9 @@ public class PageSequence extends FObj {
this.pageSequenceMaster =
this.layoutMasterSet.getPageSequenceMaster(masterName);
if (this.pageSequenceMaster == null) {
- throw new FOPException("master-reference '" + masterName
+ throw new SAXParseException("master-reference '" + masterName
+ "' for fo:page-sequence matches no"
- + " simple-page-master or page-sequence-master");
+ + " simple-page-master or page-sequence-master", locator);
}
}