Class XNIException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.smooks.engine.delivery.sax.ng.org.apache.xerces.xni.XNIException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
XMLConfigurationException
,XMLParseException
public class XNIException extends RuntimeException
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$
- Author:
- Andy Clark, IBM
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XNIException(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Throwable
getCause()
Returns the cause of thisXNIException
.Exception
getException()
Returns the wrapped exception.Throwable
initCause(Throwable throwable)
Initializes the cause of thisXNIException
.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
XNIException
public XNIException(String message)
Constructs an XNI exception with a message.- Parameters:
message
- The exception message.
-
XNIException
public XNIException(Exception exception)
Constructs an XNI exception with a wrapped exception.- Parameters:
exception
- The wrapped exception.
-
-
Method Detail
-
getException
public Exception getException()
Returns the wrapped exception.
-
initCause
public Throwable initCause(Throwable throwable)
Initializes the cause of thisXNIException
. The value must be an instance ofException
ornull
.- Overrides:
initCause
in 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
-
-