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

Function SetPyECBError

isapi/src/PyExtensionObjects.cpp:1018–1035  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1016// Setup an exception
1017
1018PyObject * SetPyECBError(char *fnName, long err /*= 0*/)
1019{
1020 DWORD errorCode = err == 0 ? GetLastError() : err;
1021 if (PyECB_Error==NULL) {
1022 PyObject *mod = PyImport_ImportModule("isapi");
1023 if (mod)
1024 PyECB_Error = PyObject_GetAttrString(mod, "ExtensionError");
1025 else
1026 PyECB_Error = PyExc_RuntimeError; // what's the alternative?
1027 Py_XDECREF(mod);
1028 }
1029 PyObject *v = Py_BuildValue("(izs)", errorCode, NULL, fnName);
1030 if (v != NULL) {
1031 PyErr_SetObject(PyECB_Error, v);
1032 Py_DECREF(v);
1033 }
1034 return NULL;
1035}
1036
1037void InitExtensionTypes()
1038{

Callers 15

WriteClientMethod · 0.85
GetServerVariableMethod · 0.85
ReadClientMethod · 0.85
SendResponseHeadersMethod · 0.85
SetFlushFlagMethod · 0.85
RedirectMethod · 0.85
GetImpersonationTokenMethod · 0.85
GetAnonymousTokenMethod · 0.85
IsKeepConnMethod · 0.85
ExecURLMethod · 0.85
GetExecURLStatusMethod · 0.85
IOCompletionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected