MCPcopy Create free account
hub / github.com/mhammond/pywin32 / PyCom_StreamMessage

Function PyCom_StreamMessage

com/win32com/src/ErrorUtils.cpp:385–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

383}
384
385void PyCom_StreamMessage(const char *pszMessageText)
386{
387#ifndef MS_WINCE
388 OutputDebugStringA(pszMessageText);
389#else
390 NKDbgPrintfW(pszMessageText);
391#endif
392 // PySys_WriteStderr has an internal 1024 limit due to varargs.
393 // weve already resolved them, so we gotta do it the hard way
394 // We can't afford to screw with the Python exception state
395 PyObject *typ, *val, *tb;
396 PyErr_Fetch(&typ, &val, &tb);
397 PyObject *pyfile = PySys_GetObject("stderr");
398 if (pyfile)
399 if (PyFile_WriteString((char *)pszMessageText, pyfile)!=0)
400 // eeek - Python error writing this error - write it to stdout.
401 fprintf(stdout, "%s", pszMessageText);
402 PyErr_Restore(typ, val, tb);
403}
404
405BOOL VLogF_Logger(PyObject *logger, const char *log_method,
406 const char *prefix, const char *fmt, va_list argptr)

Callers 4

VLogFFunction · 0.85
PyCom_LogFFunction · 0.85
_LogExceptionFunction · 0.85
_DoLogErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected