|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Basic interface for SAX error handlers.
This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY.
This is ARP specific documentation, for the general SAX documentation try the Xerces copy.
If an ARP application needs to implement customized error handling,
it must implement this interface and then register an instance with
the XML reader using the setErrorHandler
method.
Both the XML and RDF parsers will then report all errors and warnings
through this interface.
Within ARP, the default error handler reports all errors to System.err
.
RDF related errors are instances of
ParseException
.
Within ARP these are handled specially in their relationship
to ErrorHandlers, in that immediately throwing the
ParseException
passed into the ErrorHandler method is used to
indicate a promotion of the exception: from a
warning
to an error
;
from an error
to a fatalError
; or from a
fatalError
to an Exception
thrown from ARP.load
.
SAXParseException
Method Summary | |
void |
error(SAXParseException exception)
Receive notification of a recoverable error. |
void |
fatalError(SAXParseException exception)
Receive notification of a non-recoverable error. |
void |
warning(SAXParseException exception)
Receive notification of a warning. |
Method Detail |
public void warning(SAXParseException exception) throws SAXException
When exception is an instance of ParseException
,
then it is RDF related; otherwise it is an XML related
exception thrown from Xerces.
When it is an RDF related ParseException, it is
for a condition whose current error mode is
EM_WARNING
.
In this case, if the handler throws exception
then
it will be treated as an
EM_ERROR
and error
will be called.
If any other exception is thrown then that will be thrown
from ARP.load
back into user code.
exception
- The warning information encapsulated in a
SAX parse exception.public void error(SAXParseException exception) throws SAXException
When exception is an instance of ParseException
,
then it is RDF related; otherwise it is an XML related
exception thrown from Xerces.
When it is an RDF related ParseException, it is
for a condition whose current error mode is
EM_ERROR
.
In this case, if the handler throws exception
then
it will be treated as an
EM_FATAL
and fatalError
will be called.
If any other exception is thrown then that will be thrown
from ARP.load
back into user code.
exception
- The error information encapsulated in a
SAX parse exception.public void fatalError(SAXParseException exception) throws SAXException
When exception is an instance of ParseException
,
then it is RDF related; otherwise it is an XML related
exception thrown from Xerces.
When it is an RDF related ParseException, it is
for a condition whose current error mode is
EM_FATAL
.
In this case, if the handler throws exception
or any other exception is thrown then that will be thrown
from ARP.load
back into user code.
exception
- The error information encapsulated in a
SAX parse exception.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |