OS Manuals

econf_errLocation(3)

econf_errLocation - retrieve the location of the last error

ECONF_ERRLOCATION(3) libeconf Manual ECONF_ERRLOCATION(3)

econf_errLocation - retrieve the location of the last error

#include <libeconf.h>

void econf_errLocation(char **filename, uint64_t *line_nr);

econf_errLocation retrieves the file path and line number where the last libeconf error occurred. This information is stored in thread-local storage and is updated whenever a libeconf function encounters a parsing or processing error.

The filename argument is a pointer to a string pointer. On return, econf_errLocation sets this pointer to a newly allocated string containing the absolute path of the file where the error occurred. The caller is responsible for freeing this memory using free(3).

The line_nr argument is a pointer to a 64-bit unsigned integer. On return, it is set to the line number within the file where the error was detected.

This function does not return a value.

If no error has occurred, or if the error location is not available, *filename may be set to NULL and *line_nr to 0. Always check if *filename is not NULL before attempting to use or free it.

econf_errString(3), libeconf(3)

2024-03-12 libeconf

libeconf 0.8.6-r3 · os · ingested 2026-10-31