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:
java.io.Serializable
- Direct Known Subclasses:
XMLConfigurationException,XMLParseException
public class XNIException extends java.lang.RuntimeExceptionThis 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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XNIException(java.lang.Exception exception)Constructs an XNI exception with a wrapped exception.XNIException(java.lang.String message)Constructs an XNI exception with a message.XNIException(java.lang.String message, java.lang.Exception exception)Constructs an XNI exception with a message and wrapped exception.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ThrowablegetCause()Returns the cause of thisXNIException.java.lang.ExceptiongetException()Returns the wrapped exception.java.lang.ThrowableinitCause(java.lang.Throwable throwable)Initializes the cause of thisXNIException.
-
-
-
Constructor Detail
-
XNIException
public XNIException(java.lang.String message)
Constructs an XNI exception with a message.- Parameters:
message- The exception message.
-
XNIException
public XNIException(java.lang.Exception exception)
Constructs an XNI exception with a wrapped exception.- Parameters:
exception- The wrapped exception.
-
XNIException
public XNIException(java.lang.String message, java.lang.Exception exception)Constructs an XNI exception with a message and wrapped exception.- Parameters:
message- The exception message.exception- The wrapped exception.
-
-
Method Detail
-
getException
public java.lang.Exception getException()
Returns the wrapped exception.
-
initCause
public java.lang.Throwable initCause(java.lang.Throwable throwable)
Initializes the cause of thisXNIException. The value must be an instance ofExceptionornull.- Overrides:
initCausein classjava.lang.Throwable- Parameters:
throwable- the cause- Returns:
- this exception
- Throws:
java.lang.IllegalStateException- if a cause has already been setjava.lang.IllegalArgumentException- if the cause is this exceptionjava.lang.ClassCastException- if the cause is not assignable toException
-
getCause
public java.lang.Throwable getCause()
Returns the cause of thisXNIException.- Overrides:
getCausein classjava.lang.Throwable
-
-