Home Help Center

ICE user exception messages

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

Comments

  • DeepDiverDeepDiver Member Thomas MuellerOrganization: Freelance Software DeveloperProject: Project depend on Customers ✭✭✭
    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 tom
Sign In or Register to comment.