MCPcopy Index your code
hub / github.com/RustPython/RustPython / new_last_errno_error

Method new_last_errno_error

crates/vm/src/vm/vm_new.rs:251–254  ·  view source on GitHub ↗

Create a new OSError from the last POSIX errno. On windows, CRT errno are expected to be handled by this function. This is identical to `new_last_os_error` on non-Windows platforms.

(&self)

Source from the content-addressed store, hash-verified

249 /// On windows, CRT errno are expected to be handled by this function.
250 /// This is identical to `new_last_os_error` on non-Windows platforms.
251 pub fn new_last_errno_error(&self) -> PyBaseExceptionRef {
252 let err = crate::common::os::errno_io_error();
253 err.to_pyexception(self)
254 }
255
256 pub fn new_errno_error(&self, errno: i32, msg: impl ToPyObject) -> PyRef<PyOSError> {
257 let exc_type = crate::exceptions::errno_to_exc_type(errno, self)

Callers 15

if_nametoindexFunction · 0.80
if_indextonameFunction · 0.80
getrlimitFunction · 0.80
fcntlFunction · 0.80
ioctlFunction · 0.80
flockFunction · 0.80
lockfFunction · 0.80
waitpidFunction · 0.80
spawnvFunction · 0.80
spawnveFunction · 0.80
execvFunction · 0.80
execveFunction · 0.80

Calls 2

errno_io_errorFunction · 0.85
to_pyexceptionMethod · 0.45

Tested by

no test coverage detected