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

Function fire_py_throw

crates/vm/src/stdlib/sys/monitoring.rs:1000–1013  ·  view source on GitHub ↗
(
    vm: &VirtualMachine,
    code: &PyRef<PyCode>,
    offset: u32,
    exception: &PyObjectRef,
)

Source from the content-addressed store, hash-verified

998}
999
1000pub fn fire_py_throw(
1001 vm: &VirtualMachine,
1002 code: &PyRef<PyCode>,
1003 offset: u32,
1004 exception: &PyObjectRef,
1005) -> PyResult<()> {
1006 fire(
1007 vm,
1008 EVENT_PY_THROW,
1009 code,
1010 offset,
1011 &[vm.ctx.new_int(offset).into(), exception.clone()],
1012 )
1013}
1014
1015pub fn fire_stop_iteration(
1016 vm: &VirtualMachine,

Callers 1

gen_throwMethod · 0.85

Calls 3

fireFunction · 0.85
new_intMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected