if (errorCount >= ERROR_COUNT_LIMIT) {
// Ignore all errors after reaching the limit
return;
} else if (errorCount == 0) {
// Print a warning before the first error
System.err.println(SAXMessageFormatter.formatMessage(Locale.getDefault(), "errorHandlerNotSet", new Object[]{String.valueOf(ERROR_COUNT_LIMIT)}));
}
String systemId = e.getSystemId();
if (systemId == null) {
systemId = "null";
}
System.err.println(SAXMessageFormatter.formatMessage(Locale.getDefault(),"errorHandlerDebugMsg", new Object[] {
systemId,String.valueOf(e.getLineNumber()), e.getMessage()}));
errorCount++;