473,385 Members | 1,333 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Throwwing exception from __gc class to c# class

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
Nov 17 '05 #1
2 1139
Hi Steven,

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

Ronald Laeremans
Visual C++ team

"Steven Cool" <st***********@hotmail.com> wrote in message
news:35**************************@posting.google.c om...
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

Nov 17 '05 #2
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;
}

-----------------------------
and this works.

"Ronald Laeremans [MSFT]" <ro*****@online.microsoft.com> wrote in message news:<#X**************@TK2MSFTNGP12.phx.gbl>...
Hi Steven,

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

Ronald Laeremans
Visual C++ team

"Steven Cool" <st***********@hotmail.com> wrote in message
news:35**************************@posting.google.c om...
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

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: igal.ioffe | last post by:
Hi All, I've run into a problem, converting a native project into mixed mode, where usage of gcroot point in mixed mode causes a fatal CLR engine exception. Here is a tiny code extract:...
0
by: igal.ioffe | last post by:
Hi All, I've run into a problem, converting a native project into mixed mode, where usage of gcroot point in mixed mode causes a fatal CLR engine exception. Here is a tiny code extract:...
0
by: igal.ioffe | last post by:
Hi All, I've run into a problem, converting a native project into mixed mode, where usage of gcroot point in mixed mode causes a fatal CLR engine exception. Here is a tiny code extract:...
1
by: mschuck | last post by:
Here is the scenario I'm trying to make work. I've got 2 managed C++ classes, each of which wrappes an unmanaged C++ class, kind of like so: __nogc class UnmanagedClassA { public: void...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.