[commit] r1543 - trunk/GME/Mga

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Fri Sep 16 12:48:27 CDT 2011


Author: ksmyth
Date: Fri Sep 16 12:48:27 2011
New Revision: 1543

Log:
Also catch _com_error

Modified:
   trunk/GME/Mga/MgaTrukk.h

Modified: trunk/GME/Mga/MgaTrukk.h
==============================================================================
--- trunk/GME/Mga/MgaTrukk.h	Fri Sep 16 12:48:17 2011	(r1542)
+++ trunk/GME/Mga/MgaTrukk.h	Fri Sep 16 12:48:27 2011	(r1543)
@@ -296,6 +296,17 @@
 		MgaSetErrorInfo(e.hr); \
 		return e.hr; \
 	} \
+	catch(_com_error &e) \
+	{ \
+		ASSERT(FAILED(e.Error())); \
+		if ((hr = ttt.Abort()) != S_OK) return hr; \
+		{ CLEANUP; } \
+		if (e.Description() != _bstr_t()) \
+			SetErrorInfo(e.Description()); \
+		else \
+			SetStandardOrGMEErrorInfo(e.Error()); \
+		return e.Error(); \
+	} \
 	return ttt.Commit(); }
 
 #define MGAPREF_NO_NESTED_TX 0x00000080
@@ -320,6 +331,18 @@
 	MgaSetErrorInfo(e.hr); \
 	return e.hr; \
 } \
+catch(_com_error &e) \
+{ \
+	ASSERT(FAILED(e.Error())); \
+	HRESULT hr; \
+	if(!(this->mgaproject->preferences & MGAPREF_NO_NESTED_TX) && ((hr = ttt.Abort()) != S_OK)) return hr; \
+	{ CLEANUP; } \
+	if (e.Description() != _bstr_t()) \
+		SetErrorInfo(e.Description()); \
+	else \
+		SetStandardOrGMEErrorInfo(e.Error()); \
+	return e.Error(); \
+} \
 if (!(this->mgaproject->preferences & MGAPREF_NO_NESTED_TX)) \
 	return ttt.Commit(); \
 else \


More information about the gme-commit mailing list