[commit] r2117 - trunk/GME/MgaUtil
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Mon Dec 10 09:26:59 CST 2012
Author: ksmyth
Date: Mon Dec 10 09:26:58 2012
New Revision: 2117
Log:
Better error message
Modified:
trunk/GME/MgaUtil/MgaRegistrar.cpp
Modified: trunk/GME/MgaUtil/MgaRegistrar.cpp
==============================================================================
--- trunk/GME/MgaUtil/MgaRegistrar.cpp Thu Dec 6 12:41:29 2012 (r2116)
+++ trunk/GME/MgaUtil/MgaRegistrar.cpp Mon Dec 10 09:26:58 2012 (r2117)
@@ -1816,8 +1816,15 @@
if(!(type & COMPONENTTYPE_PARADIGM_INDEPENDENT)) {
paradigms.Empty();
CComPtr<IMgaComponent> comp;
- CreateMgaComponent(comp, progid);
- if(!comp) COMTHROW(E_MGA_COMPONENT_ERROR);
+ HRESULT hr = CreateMgaComponent(comp, progid);
+ if(!comp)
+ {
+ _bstr_t error;
+ GetErrorInfo(hr, error.GetAddress());
+ if (!static_cast<LPOLESTR>(error))
+ error = L"Unknown error";
+ throw_com_error(E_MGA_COMPONENT_ERROR, _bstr_t(L"Could not create: ") + progid + L": " + error);
+ }
COMTHROW(comp->get_Paradigm(PutOut(paradigms)));
}
if(mode & RM_USER) {
More information about the gme-commit
mailing list