Entropic 2.3.8
Local-first agentic inference engine
Loading...
Searching...
No Matches
error.cpp File Reference

Error type implementations for librentropic-types. More...

Include dependency graph for error.cpp:

Go to the source code of this file.

Functions

const char * entropic_error_name (entropic_error_t code)
 Get the human-readable name for an error code.
 
entropic_error_t entropic_set_error_callback (entropic_handle_t handle, entropic_error_callback_t callback, void *user_data)
 Register an error callback on a handle.
 

Variables

static const char *const s_error_names []
 Lookup table: error code → name string.
 
static constexpr int s_error_count
 

Detailed Description

Error type implementations for librentropic-types.

Version
1.8.0

Definition in file error.cpp.

Function Documentation

◆ entropic_error_name()

const char * entropic_error_name ( entropic_error_t  code)

Get the human-readable name for an error code.

Parameters
codeError code to look up.
Returns
Static string naming the error code. Never NULL.
Version
1.8.0 @utility

Definition at line 84 of file error.cpp.

◆ entropic_set_error_callback()

entropic_error_t entropic_set_error_callback ( entropic_handle_t  handle,
entropic_error_callback_t  callback,
void *  user_data 
)

Register an error callback on a handle.

Parameters
handleEngine handle.
callbackCallback function, or NULL to remove.
user_dataOpaque pointer forwarded to callback.
Returns
ENTROPIC_OK on success, ENTROPIC_ERROR_INVALID_ARGUMENT if handle is NULL.
Version
1.8.0

Definition at line 98 of file error.cpp.

Variable Documentation

◆ s_error_count

constexpr int s_error_count
staticconstexpr
Initial value:
=
static_cast<int>(sizeof(s_error_names) / sizeof(s_error_names[0]))
static const char *const s_error_names[]
Lookup table: error code → name string.
Definition error.cpp:17

Definition at line 74 of file error.cpp.

◆ s_error_names

const char* const s_error_names[]
static

Lookup table: error code → name string.

Definition at line 17 of file error.cpp.