Skip to main content

nix_set_err_msg

Function nix_set_err_msg 

Source
pub unsafe extern "C" fn nix_set_err_msg(
    context: *mut nix_c_context,
    err: nix_err,
    msg: *const c_char,
) -> nix_err
Expand description

Set an error message on a nix context.

This should be used when you want to throw an error from a PrimOp callback.

All other use is internal to the API.

§Arguments

  • context - context to write the error message to, required unless C++ exceptions are supported
  • err - The error code to set and return
  • msg - The error message to set. This string is copied.

§Returns

  • the error code set