View | Details | Raw Unified | Return to bug 30852
Collapse All | Expand All

(-)fop-0.20.5.orig/src/org/apache/fop/apps/FOPException.java (-1 / +24 lines)
Lines 50-55 Link Here
50
 */ 
50
 */ 
51
package org.apache.fop.apps;
51
package org.apache.fop.apps;
52
52
53
import java.util.ArrayList;
54
55
import org.apache.fop.fo.FObj;
53
import org.xml.sax.SAXException;
56
import org.xml.sax.SAXException;
54
57
55
58
Lines 107-112 Link Here
107
        line = -1;
110
        line = -1;
108
        column = -1;
111
        column = -1;
109
    }
112
    }
113
    
114
    public FOPException(String message, FObj node)
115
    {
116
    	super(message);
117
    	node.getMarkedLocation(this);
118
    }
110
119
111
    public FOPException(String message, Throwable e, String systemId, int line, int column) {
120
    public FOPException(String message, Throwable e, String systemId, int line, int column) {
112
        super(message);
121
        super(message);
Lines 158-163 Link Here
158
        }
167
        }
159
    }
168
    }
160
    
169
    
170
    public String getSystemId()
171
    {
172
    	return systemId;
173
    }
174
    
175
    public int getLine()
176
    {
177
    	return line;
178
    }
179
    
180
    public int getColumn()
181
    {
182
    	return column;
183
    }
184
    
161
    public void printStackTrace() {
185
    public void printStackTrace() {
162
        synchronized (System.err) {
186
        synchronized (System.err) {
163
            super.printStackTrace();
187
            super.printStackTrace();
Lines 199-203 Link Here
199
            }
223
            }
200
        }
224
        }
201
    }
225
    }
202
203
}
226
}
(-)fop-0.20.5.orig/src/org/apache/fop/fo/flow/Block.java (-1 / +1 lines)
Lines 140-146 Link Here
140
            throw new FOPException(
140
            throw new FOPException(
141
                "No meaningful layout in block after many attempts.  "+
141
                "No meaningful layout in block after many attempts.  "+
142
                "Infinite loop is assumed.  Processing halted.",
142
                "Infinite loop is assumed.  Processing halted.",
143
                systemId, line, column);
143
                this);
144
        }
144
        }
145
145
146
        // log.error(" b:LAY[" + marker + "] ");
146
        // log.error(" b:LAY[" + marker + "] ");
(-)fop-0.20.5.orig/src/org/apache/fop/fo/FObj.java (+20 lines)
Lines 236-240 Link Here
236
//             return new ArrayList(markers.values());
236
//             return new ArrayList(markers.values());
237
//         }
237
//         }
238
//     }
238
//     }
239
240
     /**
241
      * Record location of the downmost grandchild touched by
242
      * layout algorithm into exception object.
243
      * 
244
      * This location may be useful (as a <strong>hint</strong>)
245
      * certain types of fo problems.
246
      */
247
     public void getMarkedLocation(FOPException e) {
248
     	if (marker >= 0 && marker < children.size()) {
249
     		final Object child = children.get(marker);
250
     		if (child instanceof FObj)
251
     		{
252
     			final FObj fObjChild = (FObj) child;
253
     			fObjChild.getMarkedLocation(e);
254
     			return;
255
     		}
256
     	}
257
 		e.setLocation(systemId, line, column);
258
     }
239
}
259
}
240
260

Return to bug 30852