Re: COM sometimes turns exceptions into HRESULTs, sometimes doesn't - why?
- From: Kim Gräsman <kim@xxxxxxxx>
- Date: Thu, 13 Oct 2005 23:40:42 -0700
Hello Aaron,
threadproc try create object call object.method cause an access violation catch log error
Hmm... Are you relying on try/catch for catching structured exceptions (like Access Violation)?
There's a project-wide setting to enable this behavior, called /EHa, if I recall correctly.
This is sometimes frowned upon because it extends the original meaning of catch(...), which was "catch any *C++* exception that may be thrown", and structured exceptions are not C++ exceptions. That, and because it loses all information about the error condition -- all you have left is "something broke!".
Well that's a good question ... basically there are multiple DLLs implementing a common interface, loaded at runtime depending on configuration. It could have done with exported C++ classes as well, I guess (or even a C API). Someone got carried away with COM.
Yeah, COM has all the infrastructure finished, so I can see why that choice was made. Exceptions are still verboten, though.
-- Best regards, Kim Gräsman
.
- References:
- Re: COM sometimes turns exceptions into HRESULTs, sometimes doesn't - why?
- From: Aaron Lawrence
- Re: COM sometimes turns exceptions into HRESULTs, sometimes doesn't - why?
- Prev by Date: Re: Adding a webbrowser control to an IRichEditOle Windowless RichEdit
- Next by Date: Re: COM sometimes turns exceptions into HRESULTs, sometimes doesn't - why?
- Previous by thread: Re: COM sometimes turns exceptions into HRESULTs, sometimes doesn't - why?
- Next by thread: Re: COM sometimes turns exceptions into HRESULTs, sometimes doesn't - why?
- Index(es):
Relevant Pages
|
|