if (exception instanceof ForgingException) {
ErrorListener listener = ((ForgingException)exception).getErrorListener();
Enumeration e = listener.getEvents();
while(e.hasMoreElements()) {
ErrorEvent evt = (ErrorEvent)e.nextElement();
Location loc = evt.getLocation();
out.print(
" <tr bgcolor=\"#f0f0ff\">\n" +
" <td><code><strong>");
if (loc != null) {
out.print("<a href=\"");
String url = (loc.getURL() != null) ? loc.getURL().toString() : "";
out.print(url);
out.print("\">");
out.print(url);
out.print("</a>");
} else {
out.println("Unknown location");
}
out.print(
"<strong></code></td>" +
" <td><code><strong>");
if (loc != null) {
int line = loc.getLine();
if (line > 0) {
out.print(line);
} else {
out.print(" ");
}
} else {
out.print(" ");
}
out.print(
"</strong></code></td>\n" +
" <td><code><strong>");
if (loc != null) {
int column = loc.getColumn();
if (column > 0) {
out.print(column);
} else {
out.print(" ");
}
}else {
out.print(" ");
}
out.print(
"</strong></code></td>\n" +
" </tr> \n" +
" <tr bgcolor=\"#f0f0ff\">\n" +
" <td colspan=\"3\">\n" +
" <font face=\"verdana,lucida,arial,helvetica\" size=2>");
String msg = evt.getMessage();
if (msg != null) {
out.print(Conversions.encodeEntities(msg));
} else {
out.println(" ");
}