[commit] r1598 - in trunk/GME: Console Gme

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Tue Oct 11 10:10:49 CDT 2011


Author: ksmyth
Date: Tue Oct 11 10:10:49 2011
New Revision: 1598

Log:
Fix some error messages

Modified:
   trunk/GME/Console/ScriptEdit.cpp
   trunk/GME/Gme/GMEApp.cpp

Modified: trunk/GME/Console/ScriptEdit.cpp
==============================================================================
--- trunk/GME/Console/ScriptEdit.cpp	Tue Oct 11 10:10:36 2011	(r1597)
+++ trunk/GME/Console/ScriptEdit.cpp	Tue Oct 11 10:10:49 2011	(r1598)
@@ -43,7 +43,7 @@
 	catch(hresult_exception &e) 
 	{ 
 		TCHAR s[200];
-		_stprintf_s(s, _T("Scripting Initialization Error: %ld"), e.hr);
+		_stprintf_s(s, _T("Scripting Initialization Error: 0x%x"), e.hr);
 		m_console->Message(s, MSG_ERROR);
 		return false;
 	}

Modified: trunk/GME/Gme/GMEApp.cpp
==============================================================================
--- trunk/GME/Gme/GMEApp.cpp	Tue Oct 11 10:10:36 2011	(r1597)
+++ trunk/GME/Gme/GMEApp.cpp	Tue Oct 11 10:10:49 2011	(r1598)
@@ -2260,23 +2260,22 @@
 	    if(mgaConstMgr) COMTHROW(mgaConstMgr->Enable(false));
 	    COMTHROW(parser->ParseProject(mgaProject, PutInBstr(CString(xmlname))) );
 		{
-			TCHAR buf[200];
-			_stprintf_s(buf, _T("The model has been updated\nCurrent ID: %s\nThe original model has been saved to %s"), 
-					PutInCString(currentguid), backupname);
+			CString buf = CString(_T("The model has been updated\nCurrent ID: "))
+				+ currentguid + L"\nThe original model has been saved to " + backupname;
 			AfxMessageBox(buf);
 		}
 	}
 	catch(hresult_exception &e)	{
 		TCHAR buf[200];
 		if(backupname.IsEmpty()) {
-			_stprintf_s(buf, _T("The upgrade failed: %ld\nThe model has not been closed"), e.hr);
+			_stprintf_s(buf, _T("The upgrade failed: 0x%x\nThe model has not been closed"), e.hr);
 			AfxMessageBox(buf);
 		}
 		else {
 			if(backupname.Compare(fname)) {
 				if(MoveFile(backupname, fname)) backupname = fname;
 			}
-			_stprintf_s(buf, _T("The upgrade failed: %ld\nThe original model is in file %s"), e.hr, backupname);
+			_stprintf_s(buf, _T("The upgrade failed: 0x%x\nThe original model is in file %s"), e.hr, backupname);
 			AfxMessageBox(buf);
 		}
 	}


More information about the gme-commit mailing list