Top Description Fields Constructors Methods
com.sun.org.apache.xerces.internal.xni

public Class XNIException

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

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 throwable or null if the cause is nonexistent or unknown.

public Exception
getException()

Returns the wrapped exception.

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.

Doc from java.lang.Throwable.getCause.

Returns the cause of this throwable or null if the cause is nonexistent or unknown. (The cause is the throwable that caused this throwable to get thrown.)

This implementation returns the cause that was supplied via one of the constructors requiring a Throwable, or that was set after creation with the initCause(Throwable) method. While it is typically unnecessary to override this method, a subclass can override it to return a cause set by some other means. This is appropriate for a "legacy chained throwable" that predates the addition of chained exceptions to Throwable. Note that it is not necessary to override any of the PrintStackTrace methods, all of which invoke the getCause method to determine the cause of a throwable.

Returns:Throwable

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

getExceptionback to summary
public Exception getException()

Returns the wrapped exception.