Methods Summary |
---|
public void | error(org.xml.sax.SAXParseException e)
if ((flags & ERR_PRINT) != 0)
System.err.print (printParseException ("Error", e));
if ((flags & ERR_IGNORE) == 0)
throw e;
|
public void | fatalError(org.xml.sax.SAXParseException e)
if ((flags & FATAL_PRINT) != 0)
System.err.print (printParseException ("FATAL", e));
if ((flags & FATAL_IGNORE) == 0)
throw e;
|
private static java.lang.String | printParseException(java.lang.String label, org.xml.sax.SAXParseException e)
StringBuffer buf = new StringBuffer ();
int temp;
buf.append ("** ");
buf.append (label);
buf.append (": ");
buf.append (e.getMessage ());
buf.append ('\n");
// most such exceptions include the (absolute) URI for the text
if (e.getSystemId () != null) {
buf.append (" URI: ");
buf.append (e.getSystemId ());
buf.append ('\n");
}
// many include line and column numbers
if ((temp = e.getLineNumber ()) != -1) {
buf.append (" line: ");
buf.append (temp);
buf.append ('\n");
}
if ((temp = e.getColumnNumber ()) != -1) {
buf.append (" char: ");
buf.append (temp);
buf.append ('\n");
}
// public ID might be available, but is seldom useful
return buf.toString ();
|
public void | warning(org.xml.sax.SAXParseException e)
if ((flags & WARN_PRINT) != 0)
System.err.print (printParseException ("Warning", e));
// always ignored
|