SAXException (Org.XML.SAX Package)

Extends java.lang.Exception. Encapsulates a general SAX error or warning.

This class can contain basic error or warning information from either the XML parser or the application: a parser writer or application writer can create a subclass of it to provide additional functionality. SAX handlers may throw this exception or any exceptions from its subclasses.

If the application needs to pass through other types of exceptions, it must wrap those exceptions in a SAXException or an exception derived from a SAXException.

If the parser or application needs to include information about a specific location in an XML document, it should use the SAXParseException subclass. .

See the following for methods.

getException

Returns the embedded exception, if any.

Syntax:

public java.lang.Exception getException()

Return value:

The embedded exception, or null if there is none.

getMessage

Returns a detail message for this exception. If there is an embedded exception, and if the SAXException has no detail message of its own, this method will return the detail message from the embedded exception.

Syntax:

public java.lang.String getMessage()

Return value:

The error or warning message.

Overrides:

getMessage in class java.lang.Throwable