[commit] r2318 - trunk/GME/Core

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Fri Aug 30 09:05:12 CDT 2013


Author: ksmyth
Date: Fri Aug 30 09:05:12 2013
New Revision: 2318

Log:
Better ErrorInfo

Modified:
   trunk/GME/Core/CoreBinFile.cpp
   trunk/GME/Core/CoreProject.cpp

Modified: trunk/GME/Core/CoreBinFile.cpp
==============================================================================
--- trunk/GME/Core/CoreBinFile.cpp	Fri Aug 30 09:04:53 2013	(r2317)
+++ trunk/GME/Core/CoreBinFile.cpp	Fri Aug 30 09:05:12 2013	(r2318)
@@ -1123,7 +1123,10 @@
 	InitMaxObjIDs();
 
 	if (file_buffer.open(filename.c_str()) != 0) {
-		HR_THROW(HRESULT_FROM_WIN32(GetLastError()));
+		HRESULT hr = HRESULT_FROM_WIN32(GetLastError());
+		_bstr_t err;
+		GetErrorInfo(hr, err.GetAddress());
+		throw_com_error(hr, _bstr_t(L"Error opening '") + filename.c_str() + L"': " + err);
 	}
 	cifs = file_buffer.getBegin();
 	cifs_eof = file_buffer.getEnd();

Modified: trunk/GME/Core/CoreProject.cpp
==============================================================================
--- trunk/GME/Core/CoreProject.cpp	Fri Aug 30 09:04:53 2013	(r2317)
+++ trunk/GME/Core/CoreProject.cpp	Fri Aug 30 09:05:12 2013	(r2318)
@@ -209,7 +209,7 @@
 		ASSERT( corestorage != NULL );
 
 		COMTHROW( corestorage->put_MetaProject(p) );
-		COMTHROW( corestorage->OpenProject(connection, ro_mode) );
+		corestorage->__OpenProject(connection, ro_mode);
 
 		COMTHROW( put_Storage(corestorage) );
 	}


More information about the gme-commit mailing list