Update of /cvsroot/pywin32/pywin32/com/win32com/src
In directory sc8-pr-cvs1:/tmp/cvs-serv8434
Modified Files:
ErrorUtils.cpp
Log Message:
New function PyCom_SetAndLogCOMErrorFromPyExceptio(), so gateway errors
can better be seen.
Index: ErrorUtils.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/ErrorUtils.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** ErrorUtils.cpp 23 Oct 2003 06:17:49 -0000 1.19
--- ErrorUtils.cpp 24 Nov 2003 09:14:53 -0000 1.20
***************
*** 337,340 ****
--- 337,349 ----
}
+ PYCOM_EXPORT HRESULT PyCom_SetAndLogCOMErrorFromPyException(const char *methodName, REFIID riid /* = IID_NULL */)
+ {
+ if (!PyErr_Occurred())
+ // No error occurred
+ return S_OK;
+ PyCom_LogNonServerError("Unexpected exception in gateway method '%s'", methodName);
+ return PyCom_SetCOMErrorFromPyException(riid);
+ }
+
////////////////////////////////////////////////////////////////////////
// Some logging functions
|