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

Function unraisablehook

crates/vm/src/stdlib/sys.rs:1297–1308  ·  view source on GitHub ↗
(unraisable: UnraisableHookArgsData, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1295 #[pyattr]
1296 #[pyfunction(name = "__unraisablehook__")]
1297 fn unraisablehook(unraisable: UnraisableHookArgsData, vm: &VirtualMachine) {
1298 if let Err(e) = _unraisablehook(unraisable, vm) {
1299 let stderr = super::PyStderr(vm);
1300 writeln!(
1301 stderr,
1302 "{}",
1303 e.as_object()
1304 .repr(vm)
1305 .unwrap_or_else(|_| vm.ctx.empty_str.to_owned())
1306 );
1307 }
1308 }
1309
1310 #[pyattr]
1311 fn hash_info(vm: &VirtualMachine) -> PyTupleRef {

Callers

nothing calls this directly

Calls 2

_unraisablehookFunction · 0.85
PyStderrClass · 0.85

Tested by

no test coverage detected