Consider this code:
try {
ISomeObject pObj(__uuidof(SomeClass));
ISomeObject pObj2(__uuidof(SomeOtherClass));
} catch ( _com_error& e ) {
// Log what failed
}
I.e. I have a block of code which instanciates my objects. Sometimes (a bad install) it failes because some class wasn't properly registered. (I don't have a particular problem, rather general discussion here.)
Is there some way to, from the caught exception or otherwise, realize what class failed? A have pondered to make a wrapper of my own which stores a variable like gLastCreateAttemptUuid, but it feel cumbersome.
Also, suppose that SomeClass in turn attempt to instanciate something else, which isn't registered. Can one then figure out the underlying issue?