nix_err nix_set_err_msg(nix_c_context *context, nix_err err, const char *msg)
Set an error message on a nix context.
void nix_clear_err(nix_c_context *context)
Clear the error message from a nix context.
nix_c_context * nix_c_context_create()
Allocate a new nix_c_context.
nix_err nix_err_name(nix_c_context *context, const nix_c_context *read_context, nix_get_string_callback callback, void *user_data)
Retrieves the error name from a context.
void nix_c_context_free(nix_c_context *context)
Free a nix_c_context. Does not fail.
nix_err nix_err_info_msg(nix_c_context *context, const nix_c_context *read_context, nix_get_string_callback callback, void *user_data)
Retrieves the error message from errorInfo in a context.
void(* nix_get_string_callback)(const char *start, unsigned int n, void *user_data)
Called to get the value of a string owned by Nix.
Definition nix_api_util.h:133
const char * nix_err_msg(nix_c_context *context, const nix_c_context *ctx, unsigned int *n)
Retrieves the most recent error message from a context.
nix_err nix_err_code(const nix_c_context *read_context)
Retrieves the most recent error code from a nix_c_context.
nix_err
Type for error codes in the Nix system.
Definition nix_api_util.h:59
@ NIX_ERR_OVERFLOW
An overflow error occurred.
Definition nix_api_util.h:83
@ NIX_ERR_UNKNOWN
An unknown error occurred.
Definition nix_api_util.h:75
@ NIX_OK
No error occurred.
Definition nix_api_util.h:67
@ NIX_ERR_NIX_ERROR
A generic Nix error occurred.
Definition nix_api_util.h:99
@ NIX_ERR_KEY
A key error occurred.
Definition nix_api_util.h:91
const char * nix_version_get()
Retrieves the nix library version.
nix_err nix_libutil_init(nix_c_context *context)
Initializes nix_libutil and its dependencies.
nix_err nix_setting_set(nix_c_context *context, const char *key, const char *value)
Sets a setting in the nix global configuration.
nix_err nix_setting_get(nix_c_context *context, const char *key, nix_get_string_callback callback, void *user_data)
Retrieves a setting from the nix global configuration.
This object stores error state.