This class can contain basic error or warning information from either the XML parser or the application: a parser writer or application writer can subclass it to provide additional functionality. SAX handlers may throw this exception or any exception subclassed from it.
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.
org.xml.sax.SAXParseException
| Modifier and Type | Field and Description |
|---|---|
| private static final ObjectStreamField[] | serialPersistentFields
serializable fields |
| pack-priv static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | SAXException(Exception
The exception to be wrapped in a SAXException. e)Create a new SAXException wrapping an existing exception. |
| public | SAXException(String
The detail message. message, Exception The exception to be wrapped in a SAXException. e)Create a new SAXException from an existing exception. |
| Modifier and Type | Method and Description |
|---|---|
| public Throwable | Returns: Return the cause of the exceptionOverrides java. Return the cause of the exception |
| public Exception | Returns: The embedded exception, or null if there is none.Return the embedded exception, if any. |
| private Exception | |
| public String | Returns: The error or warning message.Overrides java. Return a detail message for this exception. |
| private void | readObject(ObjectInputStream
stream used for deserialization in)Hides java. Reads the "exception" field from the stream. |
| public String | Returns: A string representation of this exception.Overrides java. Override toString to pick up any embedded exception. |
| private void | writeObject(ObjectOutputStream
stream used for serialization. out)Hides java. Writes "exception" field to the stream. |
| serialPersistentFields | back to summary |
|---|---|
| private static final ObjectStreamField[] serialPersistentFields serializable fields | |
| serialVersionUID | back to summary |
|---|---|
| pack-priv static final long serialVersionUID | |
| SAXException | back to summary |
|---|---|
| public SAXException() Create a new SAXException. | |
| SAXException | back to summary |
|---|---|
| public SAXException(String message) Create a new SAXException.
| |
| SAXException | back to summary |
|---|---|
| public SAXException(Exception e) Create a new SAXException wrapping an existing exception. The existing exception will be embedded in the new one, and its message will become the default message for the SAXException.
| |
| SAXException | back to summary |
|---|---|
| public SAXException(String message, Exception e) Create a new SAXException from an existing exception. The existing exception will be embedded in the new one, but the new exception will have its own message. | |
| getCause | back to summary |
|---|---|
| public Throwable getCause() Overrides java. Return the cause of the exception
| |
| getException | back to summary |
|---|---|
| public Exception getException() Return the embedded exception, if any.
| |
| getExceptionInternal | back to summary |
|---|---|
| private Exception getExceptionInternal() | |
| getMessage | back to summary |
|---|---|
| public String getMessage() Overrides java. Return 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.
| |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException Hides java. Reads the "exception" field from the stream. And initializes the "exception" if it wasn't done before.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Override toString to pick up any embedded exception.
| |
| writeObject | back to summary |
|---|---|
| private void writeObject(ObjectOutputStream out) throws IOException Hides java. Writes "exception" field to the stream.
| |