GALANTHUS / ABI FUNCTION REFERENCE
gln_get_error_detail
Declared in <galanthus/c_api/gln_capi.h>.
GLN_API const gln_error_detail_t* GLN_CALL gln_get_error_detail(const gln_error_t* in_error);
Purpose
Returns the borrowed structured detail handle attached to a gln_error_t when one is available.
The accessor returns NULL when the error has no structured detail payload.
Return
Returns the borrowed structured detail handle stored in in_error, or NULL when no detail is available.
| Type | Nullability | Ownership |
|---|---|---|
const gln_error_detail_t* | nullable | borrowed |
Parameters
| Name | Direction | Type | Nullability | Ownership |
|---|---|---|---|---|
in_error | input | const gln_error_t* | nullable | borrowed |
Notes
Passing NULL for in_error is allowed and returns NULL.
The returned gln_error_detail_t is owned by in_error. gln_release_error invalidates it and clears the dynamic fields in the owning error.
When in_error came from gln_get_backend_result_error, the backend result envelope owns both the error and the structured detail. Destroying that envelope invalidates the detail handle and every const char* returned by gln_get_error_detail_* accessors.
Use gln_get_error_detail_kind before calling shape-specific accessors.