public class WrappedRemotingException extends RuntimeException
RuntimeException so it can be thrown as a
normal exception to a remote VM without requiring it to be part of a remoting API signature.
Note that most of the RuntimeException methods are overridden by this class to work on the
actual exception. However, Throwable.initCause(Throwable), Throwable.fillInStackTrace(),
Throwable.getStackTrace() and Throwable.setStackTrace(StackTraceElement[]) will operate on this exception object
itself, not of the actual exception. Typically, the use-cases in which this
exception object is to be used will not require those methods to be needed.
| Constructor and Description |
|---|
WrappedRemotingException(ExceptionPackage actualException)
Constructor for
WrappedRemotingException that wraps the actual exception information. |
WrappedRemotingException(Severity severity,
Throwable throwable)
Constructor for
WrappedRemotingException that takes the actual exception and wraps it in a
ExceptionPackage. |
WrappedRemotingException(Throwable throwable)
Constructor for
WrappedRemotingException that takes the actual exception and wraps it in a
ExceptionPackage. |
| Modifier and Type | Method and Description |
|---|---|
ExceptionPackage |
getActualException()
Returns the actual exception that occurred wrapped in an
ExceptionPackage. |
Throwable |
getCause()
If the actual exception had a cause, this will return a
WrappedRemotingException wrapping the cause's
ExceptionPackage. |
String |
getMessage()
Returns the message of the
actual exception. |
void |
printStackTrace()
Prints the stack trace of the
actual exception to System.err. |
void |
printStackTrace(PrintStream s)
Prints the stack trace of the
actual exception. |
void |
printStackTrace(PrintWriter w)
Prints the stack trace of the
actual exception. |
String |
toString()
Returns the
ExceptionPackage.toString() of the actual exception. |
addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, setStackTracepublic WrappedRemotingException(ExceptionPackage actualException) throws IllegalArgumentException
WrappedRemotingException that wraps the actual exception information.actualException - the actual exception that occurred (must not be null)IllegalArgumentException - if actualException is nullpublic WrappedRemotingException(Throwable throwable) throws IllegalArgumentException
WrappedRemotingException that takes the actual exception and wraps it in a
ExceptionPackage. The severity will be that used by ExceptionPackage.ExceptionPackage(Throwable).throwable - the actual exceptionIllegalArgumentException - if throwable is nullpublic WrappedRemotingException(Severity severity, Throwable throwable) throws IllegalArgumentException
WrappedRemotingException that takes the actual exception and wraps it in a
ExceptionPackage. If severity is null, then it will be assigned a default (see
ExceptionPackage.ExceptionPackage(Severity, Throwable)).severity - the severity of the exception (may be null)throwable - the actual exceptionIllegalArgumentException - if throwable is nullpublic ExceptionPackage getActualException()
ExceptionPackage.public String getMessage()
actual exception.getMessage in class Throwablepublic Throwable getCause()
WrappedRemotingException wrapping the cause's
ExceptionPackage.getCause in class ThrowableThrowable.getCause()public String toString()
ExceptionPackage.toString() of the actual exception.toString in class ThrowableThrowable.toString()public void printStackTrace()
actual exception to System.err.printStackTrace in class Throwablepublic void printStackTrace(PrintStream s)
actual exception.printStackTrace in class Throwables - the stream where the stack trace will be written topublic void printStackTrace(PrintWriter w)
actual exception.printStackTrace in class Throwablew - the writer that will print the stack traceCopyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.