GALANTHUS / ABI FUNCTION REFERENCE
gln_error_to_json
Declared in <galanthus/c_api/gln_capi.h>.
GLN_API gln_status_t GLN_CALL gln_error_to_json(
const gln_error_t* in_error,
char** out_json,
gln_error_t* out_error_or_null);
Purpose
Reads the error to JSON field from a typed error object without taking ownership of the handle.
Nullable parameter slots (out_error_or_null) may be passed as NULL; all other non-value parameters follow the nullability shown in the table.
Return
Returns GLN_OK on success and a non-OK gln_status_t value on failure.
| Type | Nullability | Ownership |
|---|---|---|
gln_status_t | value | value |
Parameters
| Name | Direction | Type | Nullability | Ownership |
|---|---|---|---|---|
in_error | input | const gln_error_t* | nonnull | borrowed |
out_json | output | char** | nonnull | transferred_out |
out_error_or_null | output | gln_error_t* | nullable | caller_allocated_output |