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

Function FilterError

isapi/src/PythonEng.cpp:404–421  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

402}
403
404void FilterError(CFilterContext *pfc, const char *errmsg)
405{
406 char *windows_error = ::GetLastError() ?
407 ::FormatSysError(::GetLastError()) : NULL;
408
409 CEnterLeavePython celp;
410 PySys_WriteStderr("Internal Filter Error: %s\n", errmsg);
411 if (PyErr_Occurred()) {
412 PyErr_Print();
413 PyErr_Clear();
414 }
415 const char *inserts[] = {errmsg, windows_error ? windows_error : "n/a"};
416 WriteEventLogMessage(EVENTLOG_ERROR_TYPE, E_PYISAPI_FILTER_FAILED,
417 2, inserts);
418 if (windows_error)
419 free(windows_error);
420 // what else to do here? AddResponseHeaders->WriteClient?
421}

Callers 3

GetFilterVersionFunction · 0.70
HttpFilterProcFunction · 0.70
TerminateFilterFunction · 0.70

Calls 2

FormatSysErrorFunction · 0.85
WriteEventLogMessageFunction · 0.85

Tested by

no test coverage detected