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

Method new_last_os_error

crates/vm/src/vm/vm_new.rs:242–245  ·  view source on GitHub ↗

Create a new OSError from the last OS error. On windows, windows-sys errors are expected to be handled by this function. This is identical to `new_last_errno_error` on non-Windows platforms.

(&self)

Source from the content-addressed store, hash-verified

240 /// On windows, windows-sys errors are expected to be handled by this function.
241 /// This is identical to `new_last_errno_error` on non-Windows platforms.
242 pub fn new_last_os_error(&self) -> PyBaseExceptionRef {
243 let err = std::io::Error::last_os_error();
244 err.to_pyexception(self)
245 }
246
247 /// Create a new OSError from the last POSIX errno.
248 ///

Callers 15

createMethod · 0.80
acquireMethod · 0.80
releaseMethod · 0.80
_get_valueMethod · 0.80
_is_zeroMethod · 0.80
closesocketFunction · 0.80
recvFunction · 0.80
sendFunction · 0.80
into_pyresultMethod · 0.80
win32_hchmodFunction · 0.80
_path_isdevdriveFunction · 0.80
killFunction · 0.80

Calls 1

to_pyexceptionMethod · 0.45

Tested by

no test coverage detected