|
Entropic 2.11.1
Local-first agentic inference engine
|
Error types for cross-.so error reporting. More...


Go to the source code of this file.
Typedefs | |
| typedef struct entropic_engine * | entropic_handle_t |
| Opaque handle to an entropic engine instance. | |
| typedef void(* | entropic_error_callback_t) (entropic_error_t code, const char *message, void *user_data) |
| Error callback type for async error reporting. | |
Functions | |
| ENTROPIC_EXPORT const char * | entropic_last_error (entropic_handle_t handle) |
| Get the last error message for a handle. | |
| ENTROPIC_EXPORT const char * | entropic_error_name (entropic_error_t code) |
| Get the human-readable name for an error code. | |
| ENTROPIC_EXPORT entropic_error_t | entropic_set_error_callback (entropic_handle_t handle, entropic_error_callback_t callback, void *user_data) |
| NOT IMPLEMENTED — reserved. | |
Error types for cross-.so error reporting.
Exceptions do NOT cross .so boundaries. All cross-boundary error reporting uses:
Definition in file error.h.
| typedef void(* entropic_error_callback_t) (entropic_error_t code, const char *message, void *user_data) |
Error callback type for async error reporting.
Registered via entropic_set_error_callback(). Called from the thread where the error occurs. The callback MUST NOT call back into the entropic API (deadlock risk). Keep callbacks short — log and return.
| code | Error code. |
| message | Null-terminated error message. Valid only for callback duration. |
| user_data | Opaque pointer passed during registration. @callback |
| typedef struct entropic_engine* entropic_handle_t |
Opaque handle to an entropic engine instance.
All per-handle functions (including entropic_last_error) operate on this. Created by entropic_create(), destroyed by entropic_destroy().
| enum entropic_error_t |
Error codes returned by all C API functions.
ENTROPIC_OK (0) on success. All other values indicate failure. Use entropic_error_name() to get a human-readable string for logging.
@req REQ-TYPE-002
| ENTROPIC_EXPORT const char * entropic_error_name | ( | entropic_error_t | code | ) |
Get the human-readable name for an error code.
| code | Error code. |
| code | Error code to look up. |
| ENTROPIC_EXPORT const char * entropic_last_error | ( | entropic_handle_t | handle | ) |
Get the last error message for a handle.
Returns the error message from the most recent failed operation on this handle. The returned string is owned by the handle and valid until the next API call on the same handle.
| handle | Engine handle (may be NULL for global errors during create). |
Get the last error message for a handle.
Pre-v2.2.6 the public symbol lived in src/types/error.cpp and ignored its handle parameter (v1.8.0 TODO never done). Moved here because the private engine_handle struct is only visible in the facade. Returns a thread-local cache copy so the pointer stays valid until the same thread reads again — matches the v1.8.0 contract documented in include/entropic/types/error.h.
Definition at line 155 of file entropic.cpp.
| ENTROPIC_EXPORT entropic_error_t entropic_set_error_callback | ( | entropic_handle_t | handle, |
| entropic_error_callback_t | callback, | ||
| void * | user_data | ||
| ) |
NOT IMPLEMENTED — reserved.
Returns ENTROPIC_ERROR_NOT_IMPLEMENTED.
entropic_error_callback_t is invoked from nowhere in the engine. It is declared here because the symbol is exported and reaches the generated Python wrapper; removing it would be an ABI break.Through v2.10.4 this returned ENTROPIC_OK, so a consumer registering a callback got success and then silence — the engine claiming a capability it does not have. As of v2.11.0 it reports ENTROPIC_ERROR_NOT_IMPLEMENTED so the absence is visible at the call site instead of at 3am.
Retrieve errors with entropic_last_error() until this is implemented.
| handle | Engine handle. |
| callback | Ignored. |
| user_data | Ignored. |
NOT IMPLEMENTED — reserved.
| handle | Engine handle. |
| callback | Callback function, or NULL to remove. |
| user_data | Opaque pointer forwarded to callback. |