Skip to content

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);
  • Family: Error and interrupt accessors
  • Return type: const gln_error_detail_t*

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.

TypeNullabilityOwnership
const gln_error_detail_t*nullableborrowed

Parameters

NameDirectionTypeNullabilityOwnership
in_errorinputconst gln_error_t*nullableborrowed

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.

See Also