[Python-ideas] Provide additional debug info for OSError and WindowsError
eryksun at gmail.com
Fri Apr 12 12:29:23 EDT 2019
On 4/12/19, Giampaolo Rodola' <g.rodola at gmail.com> wrote:
> As such I was thinking that perhaps it would be nice to provide 2 new
> cPython APIs:
> PyErr_SetFromErrnoWithMsg(PyObject *type, const char *msg)
> PyErr_SetFromWindowsErrWithMsg(int ierr, const char *msg)
> PyErr_SetExcFromWindowsErrWithMsg(PyObject *type, int ierr, const char
> With this in place also OSError and WindowsError would probably have
> to host a new "extramsg" attribute or something (but not necessarily).
Existing error handling would benefit from this proposal. win32_error
, win32_error_object_error, and PyErr_SetFromWindowsErrWithFunction
 take a function name that's currently ignored.
More information about the Python-ideas