[commit] r2457 - in trunk/GME: Common MgaUtil

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Wed Mar 5 16:38:10 CST 2014


Author: ksmyth
Date: Wed Mar  5 16:38:10 2014
New Revision: 2457

Log:
Put ProgID in SetErrorInfo when creating a component fails

Modified:
   trunk/GME/Common/CommonComponent.h
   trunk/GME/MgaUtil/MgaLauncher.cpp

Modified: trunk/GME/Common/CommonComponent.h
==============================================================================
--- trunk/GME/Common/CommonComponent.h	Tue Mar  4 13:23:55 2014	(r2456)
+++ trunk/GME/Common/CommonComponent.h	Wed Mar  5 16:38:10 2014	(r2457)
@@ -29,7 +29,12 @@
 			}
 		}
 	} else {
-		SetStandardOrGMEErrorInfo(hr);
+		_bstr_t error;
+		GetErrorInfo(hr, error.GetAddress());
+		if (static_cast<LPOLESTR>(error))
+		{
+			SetErrorInfo(static_cast<LPOLESTR>(error + L": '" + ProgID + L"'"));
+		}
 	}
 	return hr;
 }

Modified: trunk/GME/MgaUtil/MgaLauncher.cpp
==============================================================================
--- trunk/GME/MgaUtil/MgaLauncher.cpp	Tue Mar  4 13:23:55 2014	(r2456)
+++ trunk/GME/MgaUtil/MgaLauncher.cpp	Wed Mar  5 16:38:10 2014	(r2457)
@@ -526,7 +526,12 @@
 				compex->ComponentParameter[_bstr_t(L"script")] = CComVariant(scriptfile);
 			}
 		}
-		else COMTHROW(CreateMgaComponent(component, prgid));  // Before DispatchProxy: COMTHROW(component.CoCreateInstance(prgid));
+		else
+		{
+			HRESULT hr = CreateMgaComponent(component, prgid);
+			if (FAILED(hr))
+				return hr;
+		}
 
 
 		if(component == NULL) {


More information about the gme-commit mailing list