Package org.apache.xerces.xni
Class XNIException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.xerces.xni.XNIException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
XMLConfigurationException,XMLParseException
This exception is the base exception of all XNI exceptions. It
can be constructed with an error message or used to wrap another
exception object.
Note: By extending the Java
RuntimeException, XNI handlers and components are
not required to catch XNI exceptions but may explicitly catch
them, if so desired.
- Version:
- $Id: XNIException.java 766579 2009-04-20 05:31:56Z mrglavas $
- Author:
- Andy Clark, IBM
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionXNIException(Exception exception) Constructs an XNI exception with a wrapped exception.XNIException(String message) Constructs an XNI exception with a message.XNIException(String message, Exception exception) Constructs an XNI exception with a message and wrapped exception. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
XNIException
Constructs an XNI exception with a message.- Parameters:
message- The exception message.
-
XNIException
Constructs an XNI exception with a wrapped exception.- Parameters:
exception- The wrapped exception.
-
XNIException
Constructs an XNI exception with a message and wrapped exception.- Parameters:
message- The exception message.exception- The wrapped exception.
-
-
Method Details
-
getException
Returns the wrapped exception. -
initCause
Initializes the cause of thisXNIException. The value must be an instance ofExceptionornull.- Overrides:
initCausein classThrowable- Parameters:
throwable- the cause- Returns:
- this exception
- Throws:
IllegalStateException- if a cause has already been setIllegalArgumentException- if the cause is this exceptionClassCastException- if the cause is not assignable toException
-
getCause
Returns the cause of thisXNIException.
-