Hi Kevin,
If your exception contains local objects, it should be declared as 'local'. This question probably didn't come up before because using local types is unusual.
In C++ (and only in C++), the generated code for local exceptions declares a function ice_print, but does not generate its implementation. This allows the developer (so far mostly us) to provide an implementation that prints a better error message, using the data members of the exception.
Unfortunately this behavior is neither optional nor documented... so it's a bug. It would be cleaner to make this feature optional and triggered by metadata, something like:
Code:
["cpp:overwrite_ice_print"] // C++ generated code will declare ice_print,
// but won't provide its implementation
local exception MyLocalError
{
};
Would this work well for you?
Thanks,
Bernard