|
IBM WebSphere Application ServerTM Release 8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
com.ibm.ws.exception.WsException
public class WsException
The WsException
class is a subclass of java.lang.Exception
that provides support for exception chaining semantics that will be available in
the 1.4 timeframe. Exceptions that desire to inherit these semantics while
running on pre 1.4 JDKs should extend this class.
It should be noted that this class will provide only the exception chaining semantics available in 1.4. This is a subset of all the new functionality introduced in 1.4. Most of that functionality requires support from the JVM that is not available on earlier editions.
Exceptions that subclass this exception only need to add the various constructors and inherit everything else from this class.
See the javadoc for the JDK 1.4 java.lang.Throwable for a full description of the exception chaining functionality.
Note: Since the Application Server only supports JDK 1.4 and newer JDKs,
new exceptions should extend java.lang.Exception
which supports
exception chaining.
Constructor Summary | |
---|---|
WsException()
Constructs a new WsException with null as its
detail message. |
|
WsException(java.lang.String message)
Constructs a new WsException with the specified detail message. |
|
WsException(java.lang.String message,
java.lang.Throwable cause)
Constructs a new WsException with the specified detail message and cause. |
|
WsException(java.lang.Throwable cause)
Constructs a new WsException with the specified cause and a detail message of (cause==null ? |
Method Summary | |
---|---|
java.lang.Throwable |
getCause()
Return the Throwable that is considered the root cause of this WsException. |
java.lang.Throwable |
initCause(java.lang.Throwable cause)
Initialize the cause field for this WsException to the specified value. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public WsException()
null
as its
detail message. The cause is not initialized, and may subsequently be
initialized by a call to initCause(java.lang.Throwable)
.
public WsException(java.lang.String message)
initCause(java.lang.Throwable)
.
message
- the detail message. The detail message is saved for
later retrieval by the Throwable.getMessage()
method.public WsException(java.lang.Throwable cause)
cause
- the cause (which is saved for later retrieval by the
getCause()
method). (A null value is
permitted, and indicates that the cause is nonexistent or
unknown.)public WsException(java.lang.String message, java.lang.Throwable cause)
Note that the detail message associated with
cause
is not automatically incorporated in
this WsException's detail message.
message
- the detail message (which is saved for later retrieval
by the Throwable.getMessage()
method).cause
- the cause (which is saved for later retrieval by the
getCause()
method). (A null value is
permitted, and indicates that the cause is nonexistent or
unknown.)Method Detail |
---|
public java.lang.Throwable getCause()
The Throwable that is returned is either the Throwable supplied via one of
the appropriate constructors, or that set via 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, such as a legacy exception chaining infrastructure.
getCause
in interface com.ibm.ws.exception.WsNestedException
getCause
in class java.lang.Throwable
public java.lang.Throwable initCause(java.lang.Throwable cause) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException
This method can be called at most once. It is generally called from within a constructor that takes a Throwable, or immediately after constructing this object with a constructor that does not accept a \ Throwable. Thus, if a constructor that takes Throwable as a parameter is used to construct this object, it cannot be called at all.
initCause
in interface com.ibm.ws.exception.WsNestedException
initCause
in class java.lang.Throwable
cause
- the Throwable which caused this WsException to be thrown.
Null is tolerated.
Throwable
instance.
java.lang.IllegalArgumentException
- if the specified cause is this
WsException. An exception cannot be its own cause.
java.lang.IllegalStateException
- if this WsException was created with a
constructor that specified a cause, or this method has already been
called on this object.
|
IBM WebSphere Application ServerTM Release 8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |