|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.rhq.core.util.exception.WrappedRemotingException
public class WrappedRemotingException
This class can wrap up an exception in a non-object/serialized form to send to a remote system that might not have
the exception class available for deserialization. It extends 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 Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, setStackTrace |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public 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 null
public 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 exception
IllegalArgumentException - if throwable is null
public 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 exception
IllegalArgumentException - if throwable is null| Method Detail |
|---|
public 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 trace
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||