classIBXMLCALL ErrorHandler

Basic interface for error handling

Inheritance:

ErrorHandler


Public

[more] Constructors and destructor.
[more] The error handler interface.


Documentation

Basic interface for error handling.

A client may implement this interface if it needs to provide customizable error handling support during parsing of XML documents. The ErrorHandler instance should be registered with the parser using the setErrorHandler() method of the parser object.

If an ErrorHandler is registered with a parser, the parser will report all errors during parsing by invoking the methods of this interface instead of throwing the offending exception from the parser method which initiated the error-generating operation. It is up to the application to throw any exceptions if the ErrorHandler is used. Please note that the parser is not required to provide any useful information after a call to the fatalError() method of this interface.

The HandlerBase class provides the default implementation of this interface which is to ignore warnings and non-fatal errors and throwing a SAXException for fatal errors. Applications may extend this implementation rather than implementing the whole interface itself.

o Constructors and destructor.

o ErrorHandler()
Default constructor.

ovirtual ~ErrorHandler()
Destructor.

o The error handler interface.

ovoid error(SAXParseException& exception)
Notification of a recoverable error which occurred during parsing of the XML document.

The parse will invoke this method to notify the client that it has encountered a recoverable error during parsing as defined in section 1.2 of the W3C XML specification 1.0.

The parser will continue parsing after invoking this method.

The client may throw another SAXException, possibly wrapping this or a new SAXParseException.

Throws:
SAXException
Parameters:
e - A reference to an SAXParseExeception object describing the actual exception which occurred.

ovoid fatalError(SAXParseException& exception)
Notification of a non-recoverable error which occurred during parsing of the XML document.

The parse will invoke this method to notify the client that it has encountered a recoverable error during parsing as defined in section 1.2 of the W3C XML specification 1.0.

The application shall assume that the XML content being parsed by the parser is unusable after a call to this method. The application may continue to collect additional error information. If able, a parser may continue to parse the XML document, or it may terminate parsing.

The client may throw another SAXException, possibly wrapping this or a new SAXParseException.

Throws:
SAXException
Parameters:
e - A reference to an SAXParseExeception object describing the actual exception which occurred.

ovoid warning(SAXParseException& exception)
Notification of a recoverable condition which arose during parsing of the XML document.

The parser will continue parsing after invoking this method.

The client may throw another SAXException, possibly wrapping this or a new SAXParseException.

Throws:
SAXException
Parameters:
e - A reference to an SAXParseExeception object describing the actual exception which occurred.


Direct child classes:
HandlerBase
See Also:
HandlerBase

Alphabetic index Hierarchy of classes



This page was generated with the help of DOC++.