## org.apache.xerces.util
Class ErrorHandlerProxy

    java.lang.Object
      org.apache.xerces.util.ErrorHandlerProxy

All Implemented Interfaces:
  org.xml.sax.ErrorHandler

    public abstract class ErrorHandlerProxy

extends java.lang.Object
implements org.xml.sax.ErrorHandler

Wraps `XMLErrorHandler` and make it look like a SAX `ErrorHandler`.

The derived class should override the `getErrorHandler()` method so that it will return the correct `XMLErrorHandler` instance. This method will be called whenever an error/warning is found.

Experience shows that it is better to store the actual `XMLErrorHandler` in one place and looks up that variable, rather than copying it into every component that needs an error handler and update all of them whenever it is changed, IMO.

Version:
  $Id: ErrorHandlerProxy.java 320519 2005-06-22 03:58:12Z mrglavas $
Author:
  Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)

Constructor Summary
`ErrorHandlerProxy()`

Method Summary
`void` `error(org.xml.sax.SAXParseException e)`
`void` `fatalError(org.xml.sax.SAXParseException e)`
`protected abstract org.apache.xerces.xni.parser.XMLErrorHandler` `getErrorHandler()`
`void` `warning(org.xml.sax.SAXParseException e)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ErrorHandlerProxy

    public ErrorHandlerProxy()

Method Detail

### error

    public void error(org.xml.sax.SAXParseException e)
               throws org.xml.sax.SAXException

  Specified by:
    `error` in interface `org.xml.sax.ErrorHandler`
  Throws:
    `org.xml.sax.SAXException`

### fatalError

    public void fatalError(org.xml.sax.SAXParseException e)
                    throws org.xml.sax.SAXException

  Specified by:
    `fatalError` in interface `org.xml.sax.ErrorHandler`
  Throws:
    `org.xml.sax.SAXException`

### warning

    public void warning(org.xml.sax.SAXParseException e)
                 throws org.xml.sax.SAXException

  Specified by:
    `warning` in interface `org.xml.sax.ErrorHandler`
  Throws:
    `org.xml.sax.SAXException`

### getErrorHandler

    protected abstract org.apache.xerces.xni.parser.XMLErrorHandler getErrorHandler()

Copyright © 1999-2006 Apache XML Project. All Rights Reserved.