Skip to main content

with_r_unwind_protect_sourced

Function with_r_unwind_protect_sourced 

Source
pub(crate) fn with_r_unwind_protect_sourced<F, R>(
    f: F,
    call: Option<SEXP>,
    source: PanicSource,
) -> R
where F: FnOnce() -> R,
Expand description

Like with_r_unwind_protect, but reports panics with a custom [PanicSource].

Used by guarded_altrep_call so that panics inside ALTREP callbacks with AltrepGuard::RUnwind are still attributed to PanicSource::Altrep.