public interface DistributedExceptionEnabled
Modifier and Type | Method and Description |
---|---|
java.lang.Throwable |
getException(java.lang.String exceptionClassName)
Get a specific exception in a possible chain of exceptions.
|
DistributedExceptionInfo |
getExceptionInfo()
Retrieve the exception info for this exception.
|
java.lang.String |
getMessage()
Retrieve the message for this exception.
|
java.lang.Throwable |
getOriginalException()
Get the original exception in a possible chain of exceptions.
|
java.lang.Throwable |
getPreviousException()
Get the previous exception, in a possible chain of exceptions.
|
void |
printStackTrace()
Print the stack trace for this exception and all chained
exceptions.
|
void |
printStackTrace(java.io.PrintWriter pw)
Print the exception execution stack to a print writer.
|
void |
printSuperStackTrace(java.io.PrintWriter pw)
This method is called by DistributedExceptionInfo to retrieve and
save the current stack trace.
super.printStackTrace(pw)
|
java.lang.Throwable getException(java.lang.String exceptionClassName) throws ExceptionInstantiationException
String
- exceptionClassName: The class name of the specific exception.ExceptionInstantiationException
- An exception occurred while trying to re-create the exception object.
If this exception is thrown, the relevant information can be retrieved
by using the getExceptionInfo() method followed by recursively using
the getPreviousExceptionInfo() method on the DistributedExceptionInfo
object.DistributedExceptionInfo getExceptionInfo()
java.lang.String getMessage()
The following is an example of the code that should be used:
Note: During the construction of the exception and the DistributedExceptionInfo object, there is one situation that results in a call to this method. Since distributedExceptionInfo is still null, a NullPointerException could occur if the check for null is excluded.
java.lang.Throwable getOriginalException() throws ExceptionInstantiationException
ExceptionInstantiationException
- An exception occurred while trying to re-create the exception object.
If this exception is thrown, the relevant information can be retrieved
by using the getExceptionInfo() method followed by recursively using
the getPreviousExceptionInfo() method on the DistributedExceptionInfo
object.java.lang.Throwable getPreviousException() throws ExceptionInstantiationException
ExceptionInstantiationException
- An exception occurred while trying to re-create the exception object.
If this exception is thrown, the relevant information can be retrieved
by using the getExceptionInfo() method.void printStackTrace()
void printStackTrace(java.io.PrintWriter pw)
pw
- java.io.PrintWritervoid printSuperStackTrace(java.io.PrintWriter pw)
param
- java.io.PrintWriter