Skip to main content

make_rust_error_value

Function make_rust_error_value 

Source
pub fn make_rust_error_value(
    message: &str,
    kind: &str,
    call: Option<SEXP>,
) -> SEXP
Expand description

Build a tagged error-value SEXP for transport across the Rust→R boundary.

§Safety

Must be called from R’s main thread (standard R API constraint). The returned SEXP is unprotected — caller must protect if needed.

§Arguments

  • message - Human-readable error message
  • kind - Machine-readable error kind: "panic", "result_err", "none_err", or "other_rust_error"
  • call - Optional R call SEXP for error context. When None, uses R_NilValue.