FileDocCategorySizeDatePackage
ErrorHandlerAdaptor.javaAPI DocJava SE 5 API4690Fri Aug 26 14:55:54 BST 2005com.sun.org.apache.xerces.internal.jaxp.validation

ErrorHandlerAdaptor

public abstract class ErrorHandlerAdaptor extends Object implements XMLErrorHandler
Receives errors through Xerces {@link XMLErrorHandler} and pass them down to SAX {@link ErrorHandler}.
author
Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)

Fields Summary
private boolean
hadError
set to true if there was any error.
Constructors Summary
Methods Summary
public voiderror(java.lang.String domain, java.lang.String key, com.sun.org.apache.xerces.internal.xni.parser.XMLParseException e)

        try {
            hadError = true;
            getErrorHandler().error( Util.toSAXParseException(e) );
        } catch( SAXException se ) {
            throw new WrappedSAXException(se);
        }
    
public voidfatalError(java.lang.String domain, java.lang.String key, com.sun.org.apache.xerces.internal.xni.parser.XMLParseException e)

        try {
            hadError = true;
            getErrorHandler().fatalError( Util.toSAXParseException(e) );
        } catch( SAXException se ) {
            throw new WrappedSAXException(se);
        }
    
protected abstract org.xml.sax.ErrorHandlergetErrorHandler()
Implemented by the derived class to return the actual {@link ErrorHandler} to which errors are sent.

return
always return non-null valid object.

public booleanhadError()
returns if there was an error since the last invocation of the resetError method.

        
                       
        return hadError; 
public voidreset()
resets the error flag.

 hadError = false; 
public voidwarning(java.lang.String domain, java.lang.String key, com.sun.org.apache.xerces.internal.xni.parser.XMLParseException e)

        try {
            getErrorHandler().warning( Util.toSAXParseException(e) );
        } catch( SAXException se ) {
            throw new WrappedSAXException(se);
        }