[pywin32-checkins] pywin32/com/win32com/src/include PythonCOM.h,1.20,1.21
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
|
From: Mark H. <mha...@us...> - 2004-09-07 02:19:38
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10047/include Modified Files: PythonCOM.h Log Message: The gateway/server functions all now will write exception to a win32com.logger object if it exists (or to sys.stdout, like previously, if it does not). By default, no win32com.logger is created - this is designed for people who want integrated logging for their entire Python application. Index: PythonCOM.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/include/PythonCOM.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** PythonCOM.h 22 Jun 2004 01:25:50 -0000 1.20 --- PythonCOM.h 7 Sep 2004 02:19:27 -0000 1.21 *************** *** 314,317 **** --- 314,329 ---- PYCOM_EXPORT void PyCom_LogNonServerError(const char *fmt, ...); + // Log an error to a Python logger object if one can be found, or + // to stderr if no log available. + // If logProvider is not NULL, we will call a "_GetLogger_()" method on it. + // If logProvider is NULL, we attempt to fetch "win32com.logger". + // If they do not exist, return None, or raise an error fetching them + // (or even writing to them once fetched), the message still goes to stderr. + // NOTE: By default, win32com does *not* provide a logger. + PYCOM_EXPORT void PyCom_LoggerNonServerException(PyObject *logProvider, + const char *fmt, ...); + + PYCOM_EXPORT void PyCom_LoggerException(PyObject *logProvider, const char *fmt, ...); + // Write a raw string to the error device. PYCOM_EXPORT void PyCom_StreamMessage(const char *msg); *************** *** 327,330 **** --- 339,343 ---- // Set a COM exception, logging the exception if not an explicitly raised 'server' exception PYCOM_EXPORT HRESULT PyCom_SetAndLogCOMErrorFromPyException(const char *methodName, REFIID riid /* = IID_NULL */); + PYCOM_EXPORT HRESULT PyCom_SetAndLogCOMErrorFromPyExceptionEx(PyObject *provider, const char *methodName, REFIID riid /* = IID_NULL */); // Used in gateways to SetErrorInfo() with a simple HRESULT, then return it. |