Top Description Fields Constructors Methods
org.apache.xerces.xni

public Class XNIException

extends RuntimeException
Class Inheritance
Known Direct Subclasses
org.apache.xerces.xni.parser.XMLConfigurationException, org.apache.xerces.xni.parser.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.

Author
Andy Clark, IBM
Version
$Id: XNIException.java 766579 2009-04-20 05:31:56Z mrglavas $

Field Summary

Modifier and TypeField and Description
private Exception
fException

The wrapped exception.

pack-priv static final long

Constructor Summary

AccessConstructor and Description
public
XNIException(String
The exception message.
message
)

Constructs an XNI exception with a message.

public
XNIException(Exception
The wrapped exception.
exception
)

Constructs an XNI exception with a wrapped exception.

public
XNIException(String
The exception message.
message
,
Exception
The wrapped exception.
exception
)

Constructs an XNI exception with a message and wrapped exception.

Method Summary

Modifier and TypeMethod and Description
public Throwable
getCause()

Overrides java.lang.Throwable.getCause.

Returns the cause of this XNIException.
public Exception
getException()

Returns the wrapped exception.

public synchronized Throwable

Returns:

this exception
initCause
(Throwable
the cause
throwable
)

Overrides java.lang.Throwable.initCause.

Initializes the cause of this XNIException.

Field Detail

fExceptionback to summary
private Exception fException

The wrapped exception.

serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides java.lang.RuntimeException.serialVersionUID.

Serialization version.

Constructor Detail

XNIExceptionback to summary
public XNIException(String message)

Constructs an XNI exception with a message.

Parameters
message:String

The exception message.

XNIExceptionback to summary
public XNIException(Exception exception)

Constructs an XNI exception with a wrapped exception.

Parameters
exception:Exception

The wrapped exception.

XNIExceptionback to summary
public XNIException(String message, Exception exception)

Constructs an XNI exception with a message and wrapped exception.

Parameters
message:String

The exception message.

exception:Exception

The wrapped exception.

Method Detail

getCauseback to summary
public Throwable getCause()

Overrides java.lang.Throwable.getCause.

Returns the cause of this XNIException.

Returns:Throwable

Doc from java.lang.Throwable.getCause.

the cause of this throwable or null if the cause is nonexistent or unknown.

getExceptionback to summary
public Exception getException()

Returns the wrapped exception.

initCauseback to summary
public synchronized Throwable initCause(Throwable throwable)

Overrides java.lang.Throwable.initCause.

Initializes the cause of this XNIException. The value must be an instance of Exception or null.

Parameters
throwable:Throwable

the cause

Returns:Throwable

this exception

Exceptions
IllegalStateException:
if a cause has already been set
IllegalArgumentException:
if the cause is this exception
ClassCastException:
if the cause is not assignable to Exception