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

Method current_exception

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

Source from the content-addressed store, hash-verified

2056 }
2057
2058 pub(crate) fn current_exception(&self) -> Option<PyBaseExceptionRef> {
2059 self.exceptions.borrow().stack.last().cloned().flatten()
2060 }
2061
2062 pub(crate) fn set_exception(&self, exc: Option<PyBaseExceptionRef>) {
2063 // don't be holding the RefCell guard while __del__ is called

Callers 2

run_with_contextMethod · 0.80
execute_instructionMethod · 0.80

Calls 3

flattenMethod · 0.45
lastMethod · 0.45
borrowMethod · 0.45

Tested by

no test coverage detected