Home All Groups Group Topic Archive Search About

Exception handling.........

Author
12 Mar 2007 9:53 AM
Nicol
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.

Author
12 Mar 2007 6:59 PM
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.
Author
18 Mar 2007 9:53 PM
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


Show quote
"Nicol" <Ni***@discussions.microsoft.com> wrote in message
news:69868E4C-E457-4C54-AE09-D26A4326278D@microsoft.com...
> 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.

AddThis Social Bookmark Button