Save This Page
Home » Xerces-J-src.2.9.1 » org.apache.xerces » util » [javadoc | source]
org.apache.xerces.util
public class: ErrorHandlerWrapper [javadoc | source]
java.lang.Object
   org.apache.xerces.util.ErrorHandlerWrapper

All Implemented Interfaces:
    XMLErrorHandler

This class wraps a SAX error handler in an XNI error handler.
Field Summary
protected  ErrorHandler fErrorHandler    The SAX error handler. 
Constructor:
 public ErrorHandlerWrapper() 
 public ErrorHandlerWrapper(ErrorHandler errorHandler) 
    Wraps the specified SAX error handler.
Method from org.apache.xerces.util.ErrorHandlerWrapper Summary:
createSAXParseException,   createXMLParseException,   createXNIException,   error,   fatalError,   getErrorHandler,   setErrorHandler,   warning
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.xerces.util.ErrorHandlerWrapper Detail:
 protected static SAXParseException createSAXParseException(XMLParseException exception) 
    Creates a SAXParseException from an XMLParseException.
 protected static XMLParseException createXMLParseException(SAXParseException exception) 
    Creates an XMLParseException from a SAXParseException.
 protected static XNIException createXNIException(SAXException exception) 
    Creates an XNIException from a SAXException. NOTE: care should be taken *not* to call this with a SAXParseException; this will lose information!!!
 public  void error(String domain,
    String key,
    XMLParseException exception) throws XNIException 
    Reports an error. Errors are non-fatal and usually signify that the document is invalid with respect to its grammar(s).
 public  void fatalError(String domain,
    String key,
    XMLParseException exception) throws XNIException 
    Report a fatal error. Fatal errors usually occur when the document is not well-formed and signifies that the parser cannot continue normal operation.

    Note: The error handler should always throw an XNIException from this method. This exception can either be the same exception that is passed as a parameter to the method or a new XNI exception object. If the registered error handler fails to throw an exception, the continuing operation of the parser is undetermined.

 public ErrorHandler getErrorHandler() 
    Returns the SAX error handler.
 public  void setErrorHandler(ErrorHandler errorHandler) 
    Sets the SAX error handler.
 public  void warning(String domain,
    String key,
    XMLParseException exception) throws XNIException 
    Reports a warning. Warnings are non-fatal and can be safely ignored by most applications.