• Post Reply Bookmark Topic Watch Topic
  • New Topic

Handling Exceptions  RSS feed

 
Rahul Mahindrakar
Ranch Hand
Posts: 1869
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jerry Pulley
Ranch Hand
Posts: 221
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!