Hi, My Remote Object throws a checked exception(ex record not found) . I handle this exception and rethrow a new RemoteException. Hope this is how exceptions are handled in RMI. At the client side i am able to catch this exception. However I am not able to get back the MyException.toString() part of the Exception. Doesn't the RemoteException return back the toString() part via the network??. Hope i have clarified what problem i have.
posted 16 years ago
Hi, Rahul. When you throw the RemoteException, use the constructor that takes a String message and a Throwable to wrap. You can wrap the original exception in the RemoteException. Jerry