(&self)
| 2044 | } |
| 2045 | |
| 2046 | pub(crate) fn pop_exception(&self) -> Option<PyBaseExceptionRef> { |
| 2047 | let exc = self |
| 2048 | .exceptions |
| 2049 | .borrow_mut() |
| 2050 | .stack |
| 2051 | .pop() |
| 2052 | .expect("pop_exception() without nested exc stack"); |
| 2053 | #[cfg(feature = "threading")] |
| 2054 | thread::update_thread_exception(self.topmost_exception()); |
| 2055 | exc |
| 2056 | } |
| 2057 | |
| 2058 | pub(crate) fn current_exception(&self) -> Option<PyBaseExceptionRef> { |
| 2059 | self.exceptions.borrow().stack.last().cloned().flatten() |
nothing calls this directly
no test coverage detected