diff options
author | arved <arved@unknown> | 2001-02-11 00:59:26 +0000 |
---|---|---|
committer | arved <arved@unknown> | 2001-02-11 00:59:26 +0000 |
commit | 2332884442626c210db7d43075b196e38b1d0ead (patch) | |
tree | 06cabc91f683004b7e515d9db9c99e02e2fa23ac | |
parent | 67992368b922e277f887768b8a205323e76e5d2e (diff) | |
download | xmlgraphics-fop-2332884442626c210db7d43075b196e38b1d0ead.tar.gz xmlgraphics-fop-2332884442626c210db7d43075b196e38b1d0ead.zip |
Error-handling for empty flow
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194045 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/org/apache/fop/fo/flow/Flow.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/org/apache/fop/fo/flow/Flow.java b/src/org/apache/fop/fo/flow/Flow.java index 003d2297f..2af7500e0 100644 --- a/src/org/apache/fop/fo/flow/Flow.java +++ b/src/org/apache/fop/fo/flow/Flow.java @@ -159,9 +159,13 @@ public class Flow extends FObj { Vector pageMarker = this.getMarkerSnapshot(new Vector()); int numChildren = this.children.size(); + if (numChildren == 0) + { + throw new FOPException("fo:flow must contain block-level children"); + } for (int i = this.marker; i < numChildren; i++) { FObj fo = (FObj) children.elementAt(i); - + if (bac.isBalancingRequired(fo)) { // reset the the just-done span area in preparation |