aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2001-02-01 02:38:37 +0000
committerKeiron Liddle <keiron@apache.org>2001-02-01 02:38:37 +0000
commit50107d9affdd4bc20beaa1f9e83a5e6c9de5ba25 (patch)
tree22ab8de77d767fe60536cc55412c2ecfd1f293d5 /src
parent4c36038f8c07cc6de1673c0ff3d055fc2431893e (diff)
downloadxmlgraphics-fop-50107d9affdd4bc20beaa1f9e83a5e6c9de5ba25.tar.gz
xmlgraphics-fop-50107d9affdd4bc20beaa1f9e83a5e6c9de5ba25.zip
throws a more useful error if non-row inside table body
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194005 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/org/apache/fop/fo/flow/TableBody.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/org/apache/fop/fo/flow/TableBody.java b/src/org/apache/fop/fo/flow/TableBody.java
index fdd3afe89..67d1931be 100644
--- a/src/org/apache/fop/fo/flow/TableBody.java
+++ b/src/org/apache/fop/fo/flow/TableBody.java
@@ -190,7 +190,11 @@ public class TableBody extends FObj {
TableRow lastRow = null;
boolean endKeepGroup = true;
for (int i = this.marker; i < numChildren; i++) {
- TableRow row = (TableRow) children.elementAt(i);
+ Object child = children.elementAt(i);
+ if(!(child instanceof TableRow)) {
+ throw new FOPException("Currently only Table Rows are supported in table body, header and footer");
+ }
+ TableRow row = (TableRow) child;
row.setColumns(columns);
row.doSetup(areaContainer);