on 12-16-2004 4:13 PM
Hi,
I use the ui api with ms visual studio c++.
If i produce an error (ex. try to connect to sap client while no client is running) the comissue_errorex in sapbouicom.tli should print an error message. But the only thing comissue_errorex does, is to create an unhandled exception. so i've never the possibility to get the error message and to know whats wrong.
thanks for help
Hi,
First of all, please note that when a exception is created by the callee, the caller is responsible for catching it!
Unless you implement exception handling around the call e.g. to UI API, e.g. the Microsoft Visual Studio debugger will always report an "Unhandled exception". This has nothing to do with what bothers you.
Instead you should wrap some exception handler around your call - like this:
try
{
// connect to the SBO GUI application
HRESULT hr = gui->Connect (<connection string>);
if (FAILED(hr) ... <handle failure - except exception>
... <Get application object etc.> ...
}
// handle exception here...
catch (_com_error& e)
{
::MessageBox(this->m_hWnd, e.Description(), "Exception occurred", MB_OK | MB_ICONERROR);
}
...and see the information about the exception ...
HTH,
Frank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
7 | |
7 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.