[Mobies-commit] [commit] r3784 - UDM/trunk/src/UdmGme

ksmyth at redhat1.isis.vanderbilt.edu ksmyth at redhat1.isis.vanderbilt.edu
Tue Jul 12 17:21:41 CDT 2011


Author: ksmyth
Date: Tue Jul 12 17:21:40 2011
New Revision: 3784

Log:
Throw better error message if CoInitializeEx fails

Modified:
   UDM/trunk/src/UdmGme/UdmGme.cpp

Modified: UDM/trunk/src/UdmGme/UdmGme.cpp
==============================================================================
--- UDM/trunk/src/UdmGme/UdmGme.cpp	Tue Jul 12 10:35:05 2011	(r3783)
+++ UDM/trunk/src/UdmGme/UdmGme.cpp	Tue Jul 12 17:21:40 2011	(r3784)
@@ -314,7 +314,7 @@
 				LocalFree(errorText);
 			}
 		}
-		error_message << "Com exception: ";
+		error_message << "COM exception: ";
 		if (!!str) {
 			error_message << static_cast<const char*>(str);
 			error_message << " (0x" << std::hex << setw(8) << (unsigned long)a << ")";
@@ -767,7 +767,7 @@
 		
 
 
-		throw udm_exception(string("Could not reach connecting port FCO through references to it's parent, starting from the connection object. Debug info:") + debug);
+		throw udm_exception(string("Could not reach connecting port FCO through references to its parent, starting from the connection object. Debug info:") + debug);
 		return NULL;
 	}
 
@@ -824,7 +824,7 @@
 		
 
 
-		throw udm_exception(string("Could not reach connecting port FCO through references to it's parent, starting from the given reference chain. Debug info:") + debug);
+		throw udm_exception(string("Could not reach connecting port FCO through references to its parent, starting from the given reference chain. Debug info:") + debug);
 		return NULL;
 	}
 
@@ -3084,8 +3084,8 @@
 		{ 
 			// Modification: Tihamer Levendovszky - for Udm Interpreter //////////////////
 			HRESULT res=CoInitializeEx(NULL,COINIT_APARTMENTTHREADED );
-			if(res!=S_FALSE) // If a library has been initialized we are happy with that
-				COMTHROW(res);
+			if(FAILED(res)) // If COM has been initialized we are happy with that
+				com_exception(res, NULL);
 			//////////////////////////////////////////////////////////////////////////////
 			first = false; 
 		}


More information about the Mobies-commit mailing list