• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How does RMI handle exceptions?

 
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I did a quick troll through the RMI spec, and unless I overlooked something I couldn't find the answer to the following question.
What does RMI do if the server code results in an exception or error? Does the client receive the exact same kind of error? For example, would the client get an ArithmeticException for an integer divide-by-zero on the server? Or do all exceptions get wrapped in into some kind of RemoteException?
 
Ranch Hand
Posts: 1170
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Without looking I would assume the client will receive the exact exception. If its a checked exception I believe the client would be forced to catch it anyway, so why not pass along the unchecked exceptions too? I think remoteExceptions are reserved for things related the the remote nature of a specific issue that causes the exception and not something like arithmetic.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic