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

Method handle_signal_exception

crates/vm/src/frame.rs:1519–1532  ·  view source on GitHub ↗
(
                    frame: &mut ExecutingFrame<'_>,
                    exception: PyBaseExceptionRef,
                    idx: usize,
                    vm: &VirtualMachine,
                )

Source from the content-addressed store, hash-verified

1517 {
1518 #[cold]
1519 fn handle_signal_exception(
1520 frame: &mut ExecutingFrame<'_>,
1521 exception: PyBaseExceptionRef,
1522 idx: usize,
1523 vm: &VirtualMachine,
1524 ) -> FrameResult {
1525 let (loc, _end_loc) = frame.code.locations[idx];
1526 let next = exception.__traceback__();
1527 let new_traceback =
1528 PyTraceback::new(next, frame.object.to_owned(), idx as u32 * 2, loc.line);
1529 exception.set_traceback_typed(Some(new_traceback.into_ref(&vm.ctx)));
1530 vm.contextualize_exception(&exception);
1531 frame.unwind_blocks(vm, UnwindReason::Raising { exception })
1532 }
1533 match handle_signal_exception(self, exception, idx, vm) {
1534 Ok(None) => {}
1535 Ok(Some(value)) => {

Callers

nothing calls this directly

Calls 8

newFunction · 0.85
__traceback__Method · 0.80
set_traceback_typedMethod · 0.80
unwind_blocksMethod · 0.80
SomeClass · 0.50
to_ownedMethod · 0.45
into_refMethod · 0.45

Tested by

no test coverage detected