[commit] r1647 - trunk/GME/Console

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Tue Oct 25 17:32:53 CDT 2011


Author: ksmyth
Date: Tue Oct 25 17:32:53 2011
New Revision: 1647

Log:
Fix some exception handling

Modified:
   trunk/GME/Console/ScriptEdit.cpp
   trunk/GME/Console/ScriptHost.cpp

Modified: trunk/GME/Console/ScriptEdit.cpp
==============================================================================
--- trunk/GME/Console/ScriptEdit.cpp	Tue Oct 18 15:19:39 2011	(r1646)
+++ trunk/GME/Console/ScriptEdit.cpp	Tue Oct 25 17:32:53 2011	(r1647)
@@ -45,6 +45,7 @@
 		TCHAR s[200];
 		_stprintf_s(s, _T("Scripting Initialization Error: 0x%x"), e.hr);
 		m_console->Message(s, MSG_ERROR);
+		_ftprintf(stderr, _T("%s"), s);
 		return false;
 	}
 
@@ -166,6 +167,13 @@
 		TCHAR s[1000];
 		_stprintf_s(s, _T("Scripting Error: 0x%x"), e.hr);
 		m_console->Message((LPCTSTR)s, MSG_ERROR);
+		_ftprintf(stderr, _T("%s"), s);
+	}
+	catch(_com_error &e) 
+	{ 
+		TCHAR s[1000];
+		_stprintf_s(s, _T("Scripting Error: 0x%x"), e.Error());
+		_ftprintf(stderr, _T("%s"), s);
 	}
 }
 

Modified: trunk/GME/Console/ScriptHost.cpp
==============================================================================
--- trunk/GME/Console/ScriptHost.cpp	Tue Oct 18 15:19:39 2011	(r1646)
+++ trunk/GME/Console/ScriptHost.cpp	Tue Oct 25 17:32:53 2011	(r1647)
@@ -44,10 +44,8 @@
 		}
 		COMTHROW(m_iscript->SetScriptState(SCRIPTSTATE_CONNECTED));
 	}
-	catch(hresult_exception &e) 
-	{ 
-		return e.hr;
-	}
+	COMCATCH(;)
+
 	return S_OK;
 }
 


More information about the gme-commit mailing list