Similar to SAX2's ErrorHandler interface.
A callback interface
An application implements this interface and
  then registers it with the setErrorHandler() method to provide
  warnings, errors, and fatal errors.
   
IDL:
  interface DOMErrorHandler {
    void warning(in DOMLocator where, 
                 in DOMString how, 
                 in DOMString why)
                    raises(dom::DOMSystemException);
    void fatalError(in DOMLocator where, 
                    in DOMString how, 
                    in DOMString why)
                       raises(dom::DOMSystemException);
    void error(in DOMLocator where, 
               in DOMString how, 
               in DOMString why)
                  raises(dom::DOMSystemException);
  };
Java binding:
package org.w3c.dom.contentModel;
public interface DOMErrorHandler {
    public void warning(DOMLocator where, String how,  String why)
      throws DOMSystemException;
    public void fatalError(DOMLocator where, String how, String why)
      throws DOMSystemException;
    public void error(DOMLocator where, String how, String why)
      throws DOMSystemException;
}