Archived

This forum has been archived. Please start a new discussion on GitHub.

Throws Exception~

Server throws a exception(defined in a SLICE), and client catches it, is it right? If does server have to catch the exception? Thanks a lot!

Comments

  • benoit
    benoit Rennes, France
    Please see [thread=1697]this thread[/thread] for our support policy.

    Benoit.
  • I'm very Sorry, I did not know that policy before.
    i have edited my signature.
  • benoit
    benoit Rennes, France
    Thanks for completing your signature. To answer your first question, yes, the client will receive the exception raised by a servant if this exception is correctly defined in the Slice. Take a look at the manual for information on catching and raising exceptions, it's explained for each langague mapping, for example in section 6.13 and 8.6 for the C++ mapping. I'm not sure I understand your second question.

    Benoit.
  • /**
    Thanks for completing your signature. To answer your first question, yes, the client will receive the exception raised by a servant if this exception is correctly defined in the Slice. Take a look at the manual for information on catching and raising exceptions, it's explained for each langague mapping, for example in section 6.13 and 8.6 for the C++ mapping. I'm not sure I understand your second question.
    */

    ^_^ Thank you! I think i understand it.
    That is said, I don't need to catch exceptions throwed in server process, they will be catched by ICE runtime, and ICE runtime passes them to the client process, finally ICE runtime in client process re-throws those exceptions in client process?
  • benoit
    benoit Rennes, France
    Yes, that's how it works. You just need to raise the exception in your servant method implementation and it will transparently be transmitted over the wire by the Ice runtime to your client.

    Benoit.
  • Thank you! :)