Borland Rich Errors
Borland Has a problem handling exceptions generated outside of it own code. A standard implementation WILL NOT pass back any information about the nature of exceptions thrown by DicomObjects. The only way to get Borland to pass back the information is to edit a Borland header file "utilcls.h"
Search for the define of Invoke "TAutoDriver<DISPINTF>::Invoke" There will be 2 hits. In the second of these there is the following segment:
// Check for deferred EXCEPTION fill-in
if (hr == DISP_E_EXCEPTION)
if (m_ExcepInfo.pfnDeferredFillIn)
(*(m_ExcepInfo.fnDeferredFillIn))(&m_ExcepInfo);
// Turn on '__CHECKHR_ON_INVOKE' when you're debugging calls using the DISP wrappers
//
This needs to be modified to
// Check for deferred EXCEPTION fill-in
if (hr == DISP_E_EXCEPTION)
{
if (m_ExcepInfo.pfnDeferredFillIn)
(*(m_ExcepInfo.pfnDeferredFillIn))(&m_ExcepInfo);
throw Comobj::EOleException(m_ExcepInfo.bstrDescription, m_ExcepInfo.wCode,
m_ExcepInfo.bstrSource, m_ExcepInfo.bstrHelpFile, m_ExcepInfo.dwHelpContext);
}
// Turn on '__CHECKHR_ON_INVOKE' when you're debugging calls using the DISP wrappers
//
With this modification made exceptions should handle as normal.