Hello everybody,
I am writing a C++/COM application that interacts with the BOSDK. Specifically, it reads and writes information into universes objects using the designer sdk.
What I would like to learn is how to trap the exceptions that are occasionnaly generated by the sdk.
example:
IUniversePtr universe = <...>
try {
universe->LongName = "some long name";
universe->SaveAs("MYUNV.UNV"
} catch (_com_error& error) {
HRESULT res = error.Error();
// how do I decode here the error code
}
In this particular code, no connection was set to this newly created universe, and the exception gets generated when trying to save the universe.
But is there a generic way to decode error messages, and get a plain-english error message?
Thanks for your help.
Olivier Schmitt
I am writing a C++/COM application that interacts with the BOSDK. Specifically, it reads and writes information into universes objects using the designer sdk.
What I would like to learn is how to trap the exceptions that are occasionnaly generated by the sdk.
example:
IUniversePtr universe = <...>
try {
universe->LongName = "some long name";
universe->SaveAs("MYUNV.UNV"
} catch (_com_error& error) {
HRESULT res = error.Error();
// how do I decode here the error code
}
In this particular code, no connection was set to this newly created universe, and the exception gets generated when trying to save the universe.
But is there a generic way to decode error messages, and get a plain-english error message?
Thanks for your help.
Olivier Schmitt