Retrieves the current error from the Python interpreter's global state. The error is cleared from the Python interpreter. If no error is set, returns a `SystemError`.
(py: Python)
| 216 | /// The error is cleared from the Python interpreter. |
| 217 | /// If no error is set, returns a `SystemError`. |
| 218 | pub fn fetch(py: Python) -> PyErr { |
| 219 | let mut ptype: *mut ffi::PyObject = ptr::null_mut(); |
| 220 | let mut pvalue: *mut ffi::PyObject = ptr::null_mut(); |
| 221 | let mut ptraceback: *mut ffi::PyObject = ptr::null_mut(); |
| 222 | unsafe { |
| 223 | ffi::PyErr_Fetch(&mut ptype, &mut pvalue, &mut ptraceback); |
| 224 | PyErr::new_from_ffi_tuple(py, ptype, pvalue, ptraceback) |
| 225 | } |
| 226 | } |
| 227 | |
| 228 | unsafe fn new_from_ffi_tuple( |
| 229 | py: Python, |
nothing calls this directly
no outgoing calls
no test coverage detected