org.apache.xerces.util

Class ErrorHandlerProxy

public abstract class ErrorHandlerProxy extends Object implements ErrorHandler

Wraps {@link XMLErrorHandler} and make it look like a SAX {@link ErrorHandler}.

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

Experience shows that it is better to store the actual {@link 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,v 1.3 2005/06/22 03:58:12 mrglavas Exp $

Author: Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)

Method Summary
voiderror(SAXParseException e)
voidfatalError(SAXParseException e)
protected abstract XMLErrorHandlergetErrorHandler()
voidwarning(SAXParseException e)

Method Detail

error

public void error(SAXParseException e)

fatalError

public void fatalError(SAXParseException e)

getErrorHandler

protected abstract XMLErrorHandler getErrorHandler()

warning

public void warning(SAXParseException e)
Copyright © 1999-2005 Apache XML Project. All Rights Reserved.