Throwwing exception from __gc class to c# class

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
 
R

Ronald Laeremans [MSFT]

Hi Steven,

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

Ronald Laeremans
Visual C++ team
 
S

Steven Cool

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;
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top