ASF Bugzilla – Attachment 12529 Details for
Bug 30852
[patch][enhancement] "No meaningful layout in block" --> better location in FOPException
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
The patch
atagunov.2.diff (text/plain), 2.90 KB, created by
tagunov
on 2004-08-25 17:25:51 UTC
(
hide
)
Description:
The patch
Filename:
MIME Type:
Creator:
tagunov
Created:
2004-08-25 17:25:51 UTC
Size:
2.90 KB
patch
obsolete
>diff -ur fop-0.20.5.orig/src/org/apache/fop/apps/FOPException.java fop-0.20.5.atagunov/src/org/apache/fop/apps/FOPException.java >--- fop-0.20.5.orig/src/org/apache/fop/apps/FOPException.java Tue Jul 15 04:03:22 2003 >+++ fop-0.20.5.atagunov/src/org/apache/fop/apps/FOPException.java Wed Aug 25 19:27:06 2004 >@@ -50,6 +50,9 @@ > */ > package org.apache.fop.apps; > >+import java.util.ArrayList; >+ >+import org.apache.fop.fo.FObj; > import org.xml.sax.SAXException; > > >@@ -107,6 +110,12 @@ > line = -1; > column = -1; > } >+ >+ public FOPException(String message, FObj node) >+ { >+ super(message); >+ node.getMarkedLocation(this); >+ } > > public FOPException(String message, Throwable e, String systemId, int line, int column) { > super(message); >@@ -158,6 +167,21 @@ > } > } > >+ public String getSystemId() >+ { >+ return systemId; >+ } >+ >+ public int getLine() >+ { >+ return line; >+ } >+ >+ public int getColumn() >+ { >+ return column; >+ } >+ > public void printStackTrace() { > synchronized (System.err) { > super.printStackTrace(); >@@ -199,5 +223,4 @@ > } > } > } >- > } >diff -ur fop-0.20.5.orig/src/org/apache/fop/fo/flow/Block.java fop-0.20.5.atagunov/src/org/apache/fop/fo/flow/Block.java >--- fop-0.20.5.orig/src/org/apache/fop/fo/flow/Block.java Tue Jul 15 04:03:14 2003 >+++ fop-0.20.5.atagunov/src/org/apache/fop/fo/flow/Block.java Wed Aug 25 19:27:33 2004 >@@ -140,7 +140,7 @@ > throw new FOPException( > "No meaningful layout in block after many attempts. "+ > "Infinite loop is assumed. Processing halted.", >- systemId, line, column); >+ this); > } > > // log.error(" b:LAY[" + marker + "] "); >diff -ru c:/atagunov/play/fop/fop-0.20.5.orig/src/org/apache/fop/fo/FObj.java C:/atagunov/eclipse/workspace/fop.patched/build/src/org/apache/fop/fo/FObj.java >--- fop-0.20.5.orig/src/org/apache/fop/fo/FObj.java Tue Jul 15 04:03:14 2003 >+++ fop-0.20.5.atagunov/src/org/apache/fop/fo/FObj.java Wed Aug 25 19:25:23 2004 >@@ -236,5 +236,25 @@ > // return new ArrayList(markers.values()); > // } > // } >+ >+ /** >+ * Record location of the downmost grandchild touched by >+ * layout algorithm into exception object. >+ * >+ * This location may be useful (as a <strong>hint</strong>) >+ * certain types of fo problems. >+ */ >+ public void getMarkedLocation(FOPException e) { >+ if (marker >= 0 && marker < children.size()) { >+ final Object child = children.get(marker); >+ if (child instanceof FObj) >+ { >+ final FObj fObjChild = (FObj) child; >+ fObjChild.getMarkedLocation(e); >+ return; >+ } >+ } >+ e.setLocation(systemId, line, column); >+ } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 30852
: 12529 |
12530
|
12531