Re: how to view the type of catch all (...) exception by Bruno
Bruno
Mon Feb 06 03:18:56 CST 2006
Hi Alex,
"Alex Blekhman" <tkfx.N05P4M@yahoo.com> wrote in message
news:e3IkDqvKGHA.2064@TK2MSFTNGP09.phx.gbl...
> Bruno van Dooren wrote:
>>
>> personally, I think you shouldn't use catch(...) at all.
>> the reason is that catch(...) also eats SEH execptions.
>> i.e. dereferencing an invalid pointer, an array overflow
>> or something else will get caught in catch(...).
>
> Fortunately, in VC2005 SEH and C++ exceptions are separated at last. So,
> by default (/EHs) only C++ exceptions are caught by catch(...).
Thanks. I Learned this with VC2003. Good thing they changed that.
I guess that takes some of the wind out of my argument...
Still, if your program catches ..., you still don't know what is going on,
so it's usefulness is limited.
Especially if you are dealing with 'physical resources' like files, devices,
databases etc, you cannot be
sure of your program state.
kind regards,
Bruno.