CONTENTS | PREV | NEXT | Java Remote Method Invocation |
RemoteException
Class
The classjava.rmi.RemoteException
is the common superclass of a number of communication-related exceptions that may occur during the execution of a remote method call. Each method of a remote interface, an interface, must listRemoteException
(or one of its superclasses such asjava.io.IOException
orjava.lang.Exception
) in its throws clause.
package java.rmi;public class RemoteException extends java.io.IOException { public Throwable detail;
public RemoteException(); public RemoteException(String s); public RemoteException(String s, Throwable ex);
public String getMessage(); public void printStackTrace(); public void printStackTrace(java.io.PrintStream ps); public void printStackTrace(java.io.PrintWriter pw); }
ARemoteException
can be constructed with a detail message, s, and a nested exception, ex (aThrowable
). Typically, the nested exception, ex, specified as a parameter in the third form of the constructor, is the underlying I/O exception that occurred during an RMI call.The
getMessage
method returns the detail message of the exception, including the message from the nested exception (if any).The
printStackTrace
methods are overridden from the classjava.lang.Throwable
to print out the stack trace of the nested exception.
CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.