3.5 ErrorHandler

This interface is the basic interface for SAX error handlers.

If a SAX application needs to implement customized error handling, it must implement this interface and then register an instance with the SAX parser using the parser’s setErrorHandler method. The parser will then report all errors and warnings through this interface.

The parser shall use this interface instead of throwing an exception: it is up to the application whether to throw an exception for different types of errors and warnings. There is no requirement that the parser continue to provide useful information after a call to fatalError; in other words, a SAX driver class could catch an exception and report a fatalError.