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

Method throw

crates/vm/src/builtins/coroutine.rs:118–133  ·  view source on GitHub ↗
(
        &self,
        exc_type: PyObjectRef,
        exc_val: OptionalArg,
        exc_tb: OptionalArg,
        vm: &VirtualMachine,
    )

Source from the content-addressed store, hash-verified

116
117 #[pymethod]
118 fn throw(
119 &self,
120 exc_type: PyObjectRef,
121 exc_val: OptionalArg,
122 exc_tb: OptionalArg,
123 vm: &VirtualMachine,
124 ) -> PyResult<PyIterReturn> {
125 warn_deprecated_throw_signature(&exc_val, &exc_tb, vm)?;
126 self.inner.throw(
127 self.as_object(),
128 exc_type,
129 exc_val.unwrap_or_none(vm),
130 exc_tb.unwrap_or_none(vm),
131 vm,
132 )
133 }
134
135 #[pymethod]
136 fn close(&self, vm: &VirtualMachine) -> PyResult<PyObjectRef> {

Callers

nothing calls this directly

Calls 5

as_objectMethod · 0.45
unwrap_or_noneMethod · 0.45
check_closedMethod · 0.45
storeMethod · 0.45

Tested by

no test coverage detected