Hi Lawrence,
Your exception hierarchy looks like this
Code:
exception FSDException
{
string message;
};
exception FSDControlException extends FSDException
{
};
I am bit confused by your description of the problem and whether you are expecting message as defined in Slice or the ApplicationException Message property to be set. I am going to assume it is the slice exception member message that you want set, and to remove any further confusion I am going to rename it so the slice is as follows:
Code:
exception FSDException
{
string msg;
};
exception FSDControlException extends FSDException
{
};
Now, you are creating the exception on the server side using the following code
Code:
throw new FSDControlException("my message string");
For Ice 3.1.0 the above code does not set the exception msg data member. From Ice 3.2.0 onward the above code would be correct as we added one-shot constructors. Here is the relevant entry from our CHANGES file.
Code:
- The exception mapping now provides "one-shot" constructors that
permit the data members of an exception to be initialized during
construction (similar to the way class members can be initialized
during construction).
With this new mapping, the "Message" property of the base class
System.ApplicationException can no longer be set; the property is
initialized to the empty string. See the Ice Manual for more
details.
Therefore with Ice 3.1.0, in order to do what I think you want to do, you need to do the following:
Code:
FSDControlException ex = new FSDControlException();
ex.msg = "my message string";
throw ex;
If I have misunderstood your problem and you are expecting Message property to be set, please let me know.
Dwayne