public class XMLException extends RuntimeException
This class can contain basic error or warning information from either the parser or the application.
If the application needs to pass through other types of exceptions, it must wrap those exceptions in a XMLException.
| Constructor and Description |
|---|
XMLException(Exception e)
Creates a new XMLException wrapping an existing exception.
|
XMLException(String message)
Creates a new XMLException.
|
XMLException(String message,
Exception e)
Creates a new XMLException from an existing exception.
|
| Modifier and Type | Method and Description |
|---|---|
Exception |
getException()
Return the embedded exception, if any.
|
String |
getMessage()
Return a detail message for this exception.
|
void |
printStackTrace()
Prints this
Exception and its backtrace to the
standard error stream. |
void |
printStackTrace(PrintStream s)
Prints this
Exception and its backtrace to the
specified print stream. |
void |
printStackTrace(PrintWriter s)
Prints this
Exception and its backtrace to the specified
print writer. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toStringprotected Exception exception
public XMLException(String message)
message - The error or warning message.public XMLException(Exception e)
The existing exception will be embedded in the new one, and its message will become the default message for the XMLException.
e - The exception to be wrapped in a XMLException.public XMLException(String message, Exception e)
The existing exception will be embedded in the new one, but the new exception will have its own message.
message - The detail message.e - The exception to be wrapped in a SAXException.public String getMessage()
If there is a embedded exception, and if the XMLException has no detail message of its own, this method will return the detail message from the embedded exception.
getMessage in class Throwablepublic Exception getException()
public void printStackTrace()
Exception and its backtrace to the
standard error stream.printStackTrace in class Throwablepublic void printStackTrace(PrintStream s)
Exception and its backtrace to the
specified print stream.printStackTrace in class Throwables - PrintStream to use for outputpublic void printStackTrace(PrintWriter s)
Exception and its backtrace to the specified
print writer.printStackTrace in class Throwables - PrintWriter to use for outputCopyright © 2000–2024 Apache Software Foundation. All rights reserved.