[commit] r2379 - trunk/GME/Mga

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Tue Oct 1 16:19:13 CDT 2013


Author: ksmyth
Date: Tue Oct  1 16:19:13 2013
New Revision: 2379

Log:
Better ErrorInfo for failing to start addon

Modified:
   trunk/GME/Mga/MgaProject.cpp

Modified: trunk/GME/Mga/MgaProject.cpp
==============================================================================
--- trunk/GME/Mga/MgaProject.cpp	Tue Oct  1 15:40:42 2013	(r2378)
+++ trunk/GME/Mga/MgaProject.cpp	Tue Oct  1 16:19:13 2013	(r2379)
@@ -1253,7 +1253,7 @@
 		vec.resize(p);
 		CopyTo(progids, &vec[0], (&vec[0])+vec.size());
 		inautoaddoncreate = true;
-		CComBSTR errs = L"Could not create AddOn: ";
+		CComBSTR errs;
 		for(std::vector<CComBstrObj>::iterator i = vec.begin(); i < vec.end(); ++i) {
 			try {
 				CComPtr<IMgaComponent> addon;
@@ -1282,9 +1282,9 @@
 		}
 		inautoaddoncreate = false;
 		autoaddoncreate_progid = L"";
-		if(errs) {
-				SetErrorInfo(errs);
-				COMTHROW(E_MGA_COMPONENT_ERROR); // change error type
+		if (errs) {
+			SetErrorInfo(_bstr_t(L"Could not create AddOn: ") + static_cast<const wchar_t*>(errs));
+			COMTHROW(E_MGA_COMPONENT_ERROR); // change error type
 		}		
 	}
 //	SetAutomatic();


More information about the gme-commit mailing list