aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/pagination/Declarations.java
diff options
context:
space:
mode:
authorGlen Mazza <gmazza@apache.org>2004-07-27 05:12:41 +0000
committerGlen Mazza <gmazza@apache.org>2004-07-27 05:12:41 +0000
commit33e6293e88e33dfba73f66e7afee63323f884119 (patch)
tree2a183b55f5239ae64000564ad13e0468c5eba333 /src/java/org/apache/fop/fo/pagination/Declarations.java
parentdbefd55bda61baaac9c6c068e94166ec740f9eea (diff)
downloadxmlgraphics-fop-33e6293e88e33dfba73f66e7afee63323f884119.tar.gz
xmlgraphics-fop-33e6293e88e33dfba73f66e7afee63323f884119.zip
Switch from IllegalArgumentException to SAXParseException for errors found in the input FO.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197843 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/pagination/Declarations.java')
-rw-r--r--src/java/org/apache/fop/fo/pagination/Declarations.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/fo/pagination/Declarations.java b/src/java/org/apache/fop/fo/pagination/Declarations.java
index b5506cefc..02292802f 100644
--- a/src/java/org/apache/fop/fo/pagination/Declarations.java
+++ b/src/java/org/apache/fop/fo/pagination/Declarations.java
@@ -26,6 +26,7 @@ import java.util.Iterator;
// XML
import org.xml.sax.Attributes;
import org.xml.sax.Locator;
+import org.xml.sax.SAXParseException;
// FOP
import org.apache.fop.fo.FOElementMapping;
@@ -60,7 +61,8 @@ public class Declarations extends FObj {
XSL 1.0: (color-profile)+ (and non-XSL NS nodes)
FOP/XSL 1.1: (color-profile)* (and non-XSL NS nodes)
*/
- protected void validateChildNode(Locator loc, String nsURI, String localName) {
+ protected void validateChildNode(Locator loc, String nsURI, String localName)
+ throws SAXParseException {
if (nsURI == FOElementMapping.URI) {
if (!localName.equals("color-profile")) {
invalidChildError(loc, nsURI, localName);
@@ -72,7 +74,7 @@ public class Declarations extends FObj {
* At the end of this element sort out the child into
* a hashmap of color profiles and a list of external xml.
*/
- protected void endOfNode() {
+ protected void endOfNode() throws SAXParseException {
if (childNodes != null) {
for (Iterator iter = childNodes.iterator(); iter.hasNext();) {
FONode node = (FONode)iter.next();