public class RMIException
extends com.gemstone.gemfire.GemFireException
RuntimeException wraps the actual
exception. It allows distributed unit tests to verify that an
exception was thrown in a different VM.
VM vm0 = host0.getVM(0);
try {
vm.invoke(this.getClass(), "getUnknownObject");
} catch (RMIException ex) {
assertEquals(ex.getCause() instanceof ObjectException);
}
Note that special steps are taken so that the stack trace of the
cause exception reflects the call stack on the remote machine.
The stack trace of the exception returned by getCause()
may not be available.RemoteTestModuleIF,
Serialized Form| Constructor and Description |
|---|
RMIException(VM vm,
String className,
String methodName,
Throwable cause)
Creates a new
RMIException that was caused by a
given Throwable while invoking a given method. |
RMIException(VM vm,
String className,
String methodName,
Throwable cause,
String stackTrace)
Creates a new
RMIException to indicate that an
exception of a given type was thrown while invoking a given
method. |
| Modifier and Type | Method and Description |
|---|---|
Throwable |
getCause()
Returns the cause of this exception.
|
String |
getExceptionClassName()
Returns the class name of the exception that was thrown in a
remote method invocation.
|
VM |
getVM()
Returns the VM in which the remote method was invoked
|
getOrigin, getRootCause, setOriginaddSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic RMIException(VM vm, String className, String methodName, Throwable cause)
RMIException that was caused by a
given Throwable while invoking a given method.public RMIException(VM vm, String className, String methodName, Throwable cause, String stackTrace)
RMIException to indicate that an
exception of a given type was thrown while invoking a given
method.vm - The VM in which the method was executingclassName - The name of the class whose method was being invoked
remotelymethodName - The name of the method that was being invoked remotelycause - The type of exception that was thrown in the remote VMstackTrace - The stack trace of the exception from the remote VMpublic String getExceptionClassName()
public Throwable getCause()
public VM getVM()
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.