Your managed classes shouldn't allow to throw unmanaged exceptions.
They're going to crash if you let them propagate outside of the native
world. Your managed wrapper should catch every unamanged exception and
translate them each to managed exceptions.
try
{
unmanaged();
}
catch(...)
{
throw gcnew System::Exception("descr"); // using VC++ 2005 syntax
}
Tom
yaron wrote:
Hi,
How do i catch an unmanaged c++ exceptions ?
right now i can catch the System.Runtime.InteropServices.SEHException and
System.Exception exceptions , but i wan't to catch myException unmanaged
class , how do i do this ?
Thanks.