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

Method topmost_exception

crates/vm/src/vm/mod.rs:2109–2112  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

2107 }
2108
2109 pub(crate) fn topmost_exception(&self) -> Option<PyBaseExceptionRef> {
2110 let excs = self.exceptions.borrow();
2111 excs.stack.iter().rev().find_map(|e| e.clone())
2112 }
2113
2114 pub fn handle_exit_exception(&self, exc: PyBaseExceptionRef) -> u32 {
2115 if exc.fast_isinstance(self.ctx.exceptions.system_exit) {

Callers 10

execute_instructionMethod · 0.80
execute_raiseMethod · 0.80
exceptionFunction · 0.80
exc_infoFunction · 0.80
_current_exceptionsFunction · 0.80
push_exceptionMethod · 0.80
pop_exceptionMethod · 0.80
set_exceptionMethod · 0.80

Calls 4

borrowMethod · 0.45
revMethod · 0.45
iterMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected