Throwwing exception from __gc class to c# class

  • Thread starter Thread starter Steven Cool
  • Start date Start date
S

Steven Cool

Hello,

I have a problem with trowing exception from a __gc class to c# class.

I have a wrapper class which wraps an unmanaged class. On a certain
moment I check something in that wrapper and if the result is false, I
throw a selfMadeException. The selfMadeException is extended from the
System.Exception Class.
Everything works fine in debug mode but when i turn into release mode,
the program crashes on throwing the exception...

Does somebody knows a solution for this problem?

regards

Steven
 
Hi Steven,

A (small but complete) repro case is essential to get good help on questions
like this.

Ronald Laeremans
Visual C++ team
 
Hi Ronald,

I can't reproduce my problem in a simple case.

I solved my problem like his:
--------------------------
SelfMadeException sme = new SelfMadeException("error"));

try
{
throw sme;
}
catch(...)
{
throw;
}
 
Back
Top