Re: Exception and GetLastError()
- From: "William DePalo [MVP VC++]" <willd.no.spam@xxxxxxxx>
- Date: Mon, 23 Jul 2007 11:57:08 -0400
"hangaround" <hangaround@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C86528AA-24C4-4AA5-90AB-30A7FA0064A3@xxxxxxxxxxxxxxxx
Hi there:
look at code blow
////////////////////
try
{
blah blah blah
}catch(...)
{
DWORD dw = GetLastError()
}
////////////////////
Does it make sence to call GetLastError() in catch block?
In my opinion, I dont think it's necesary do like above, but could sure
about it.
There is not enough information to say with certainty if the last error
would be meaningful at all. That's because some functions do not clear the
error code in advance and in the case where the function succeeds the value
is stale.
Regards,
Will
.
- Prev by Date: Re: STL vector - which style of for() loop?
- Next by Date: Re: Exception and GetLastError()
- Previous by thread: context switch
- Next by thread: Re: Exception and GetLastError()
- Index(es):
Relevant Pages
|