*/
package org.apache.fop.apps;
import org.apache.fop.fo.FObj;
import org.xml.sax.SAXException;
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) {
public String getSystemId()
return systemId;
public int getLine()
return line;
public int getColumn()
return column;
public void printStackTrace() {
synchronized (System.err) {
super.printStackTrace();
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 + "] ");
// 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);