Skip to main content

R_tryCatchError

Function R_tryCatchError 

Source
pub(crate) unsafe fn R_tryCatchError(
    body: Option<unsafe extern "C-unwind" fn(*mut c_void) -> SEXP>,
    bdata: *mut c_void,
    handler: Option<unsafe extern "C-unwind" fn(SEXP, *mut c_void) -> SEXP>,
    hdata: *mut c_void,
) -> SEXP
Expand description

Call body(bdata) with an exiting handler for conditions of class error: on such a condition, handler(cond, hdata) runs after the unwind and its value is returned. Built on R’s tryCatch(), so the caller’s handlers stay visible to body (wrap it in R_ToplevelExec to hide them). Checked wrapper for R_tryCatchError. Calls R_tryCatchError_unchecked and routes through with_r_thread. Generated from source location line 991, column 19. Generated from source file miniextendr-api/src/sys.rs.