public abstract class ErrorHandlerProxy extends Object implements ErrorHandler
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.
Constructor and Description |
---|
ErrorHandlerProxy() |
Modifier and Type | Method and Description |
---|---|
void |
error(SAXParseException e) |
void |
fatalError(SAXParseException e) |
protected abstract XMLErrorHandler |
getErrorHandler() |
void |
warning(SAXParseException e) |
public void error(SAXParseException e) throws SAXException
error
in interface ErrorHandler
SAXException
public void fatalError(SAXParseException e) throws SAXException
fatalError
in interface ErrorHandler
SAXException
public void warning(SAXParseException e) throws SAXException
warning
in interface ErrorHandler
SAXException
protected abstract XMLErrorHandler getErrorHandler()
Copyright © 2017 JBoss by Red Hat. All rights reserved.