Exception handling.........

G

Guest

How to handle general exception in vc++?
This is the VC++ ATL project which i openend in vc++.net.

I am using like "catch(...)
{
DWORD dw = GetLastError();
char excMsg[80];
ltoa(dw, excMsg, 10);
LogMsg(excMsg);*/
}

Is the above corerct?
will it give any problem at runtime?
will it catch all type of errors?
I am getting some error when i referred this dll in .net. but it is not
logged as i mentioned in my catch to do..

Help me..
Tx in advance.
 
M

Michael Nemtsev

Hello Nicol,

Ask at microsoft.public.dotnet.languages.vc
because current group are for .NET

---
WBR, Michael Nemtsev [C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

N> How to handle general exception in vc++?
N> This is the VC++ ATL project which i openend in vc++.net.
N> I am using like "catch(...)
N> {
N> DWORD dw = GetLastError();
N> char excMsg[80];
N> ltoa(dw, excMsg, 10);
N> LogMsg(excMsg);*/
N> }
N> Is the above corerct?
N> will it give any problem at runtime?
N> will it catch all type of errors?
N> I am getting some error when i referred this dll in .net. but it is
N> not
N> logged as i mentioned in my catch to do..
N> Help me..
N> Tx in advance.
 
A

Alvin Bruney [MVP]

usually, it's just catch{} to catch all exceptions. The exceptions that
aren't being caught may not be coming from code that is wrapped in exception
handling code. What type is specified in the uncaught exception, and what
line is it coming from?

I agree with first responder, you should post in the appropriate newsgroup.

--
Regards,
Alvin Bruney
------------------------------------------------------
Shameless author plug
Excel Services for .NET is coming...
OWC Black book on Amazon and
www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley
 

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