FileDocCategorySizeDatePackage
DefaultValidationErrorHandler.javaAPI DocJava SE 5 API4026Fri Aug 26 14:55:52 BST 2005com.sun.org.apache.xerces.internal.jaxp

DefaultValidationErrorHandler

public class DefaultValidationErrorHandler extends DefaultHandler
version
$Id: DefaultValidationErrorHandler.java,v 1.5 2004/02/24 23:15:58 mrglavas Exp $

Fields Summary
private static int
ERROR_COUNT_LIMIT
private int
errorCount
Constructors Summary
Methods Summary
public voiderror(org.xml.sax.SAXParseException e)

    
    
          
        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++;