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

Method new_errno_error

crates/vm/src/vm/vm_new.rs:256–261  ·  view source on GitHub ↗
(&self, errno: i32, msg: impl ToPyObject)

Source from the content-addressed store, hash-verified

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)
258 .unwrap_or(self.ctx.exceptions.os_error);
259
260 self.new_os_subtype_error(exc_type.to_owned(), Some(errno), msg)
261 }
262
263 pub fn new_unicode_decode_error_real(
264 &self,

Callers 4

set_from_windows_errFunction · 0.80
raise_signalFunction · 0.80
unsetenvFunction · 0.80

Calls 4

errno_to_exc_typeFunction · 0.85
new_os_subtype_errorMethod · 0.80
SomeClass · 0.50
to_ownedMethod · 0.45

Tested by

no test coverage detected