Skip to main content

catch_error

Function catch_error 

Source
unsafe extern "C-unwind" fn catch_error(data: *mut c_void) -> SEXP
Expand description

Run a TryEvalData’s body with error conditions caught (R_tryCatchError), and store its value, or the caught condition, in its slot. Returns R_tryCatchError’s value: the body’s, or NULL after an error (TryEvalData::outcome tells them apart).

R_tryCatchError runs R’s tryCatch(), so the caller’s calling handlers see the evaluation’s other conditions, and any jump that is not an error (an exiting handler or restart of the caller’s) passes through. A jump out of here crosses no Rust frame holding anything to drop.