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::Excepti on("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.Exceptio n exceptions , but i wan't to catch myException unmanaged
class , how do i do this ?
Thanks.