March 2003
Intermediate to advanced
656 pages
39h 30m
English
PyErr_SetFromErrno
PyObject* PyErr_SetFromErrno(PyObject* type)Raises an exception of class type, a
built-in such as PyExc_OSError, or an exception
class created with PyErr_NewException. Takes all
details from global variable errno, which C
library functions and system calls set for many error cases, and the
standard C library function strerror. Returns
NULL, so your code can just call:
return PyErr_SetFromErrno(PyExc_IOError);
Read now
Unlock full access