Skip to main content

odin_error_format

Formats an ODIN return code into a human readable string representation for use in logging and diagnostics. If buf is NULL this functions simply returns the required buffer length to store the output buffer.

Declaration
size_t odin_error_format(OdinReturnCode error, char *buf, size_t buf_len);

Parameters

error_code

The error code to be formatted. See

OdinReturnCode

for details.

Declaration
OdinReturnCode error_code;

buf

Buffer to store the formatted error message.

Declaration
char *buf;

buf_len

Length of the buffer.

Declaration
size_t buf_len;

Returns

The number of characters written to the buffer or the required buffer length if buf is NULL.

Return Type
size_t