Skip to content

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);
  • Family: Row field accessors
  • Return type: gln_status_t

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.

TypeNullabilityOwnership
gln_status_tvaluevalue

Parameters

NameDirectionTypeNullabilityOwnership
in_errorinputconst gln_error_t*nonnullborrowed
out_jsonoutputchar**nonnulltransferred_out
out_error_or_nulloutputgln_error_t*nullablecaller_allocated_output

See Also