Skip to main content

take_last_panic_location

Function take_last_panic_location 

Source
pub(crate) fn take_last_panic_location() -> Option<(String, u32)>
Expand description

Take (read + clear) the last panic location recorded on the current thread.

Returns None when no panic hook fired on this thread since the last take (e.g. the hook was never installed, as in some unit tests / the engine). Clearing on read means a location from a panic that was caught-and-diverted (e.g. the internal RErrorMarker on the R-longjmp path) never bleeds onto an unrelated later message.