Archived
This forum has been archived. Please start a new discussion on GitHub.
ICE user exception messages
in Help Center
Hi,
I'm using ICE 2.0 with C# and am passing an exception from server to client.The SLICE definition contains the user exception with no fields defined. The exception is thrown on the server:
throw new MyException("My message");
The client gets the exception fine, except the mesage ("My message") is not present. Of course this minor problem can easily be got round, but is there any way to have the message text available on the client?
Thanks
Chris
I'm using ICE 2.0 with C# and am passing an exception from server to client.The SLICE definition contains the user exception with no fields defined. The exception is thrown on the server:
throw new MyException("My message");
The client gets the exception fine, except the mesage ("My message") is not present. Of course this minor problem can easily be got round, but is there any way to have the message text available on the client?
Thanks
Chris
0
Comments
-
hi
the message you pass to the constructor is taken by System.Exception.
As you wrote:The SLICE definition contains the user exception with no fields defined
So ICE doesn't know anything about your message.
You need to add a filed to your exception and explicit assign your message
to the member.
cu tom0