'\" t
.\" Title: ECONF_ERRLOCATION
.\" Author: libeconf developers
.\" Generator: DocBook XSL Stylesheets vsnapshot
.\" Date: 2024-03-12
.\" Manual: libeconf Manual
.\" Source: libeconf
.\" Language: English
.\"
.TH "ECONF_ERRLOCATION" "3" "2024\-03\-12" "libeconf" "libeconf Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
econf_errLocation \- retrieve the location of the last error
.SH "SYNOPSIS"
.sp
.ft B
.nf
#include
.fi
.ft
.sp
.BI "void econf_errLocation(char\ **" "filename" ", uint64_t\ *" "line_nr" ");"
.SH "DESCRIPTION"
.PP
\fBeconf_errLocation\fR 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\&.
.PP
The \fIfilename\fR argument is a pointer to a string pointer\&. On return, \fBeconf_errLocation\fR 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
\fBfree\fR(3)\&.
.PP
The \fIline_nr\fR 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\&.
.SH "RETURN VALUE"
.PP
This function does not return a value\&.
.SH "NOTES"
.PP
If no error has occurred, or if the error location is not available, \fI*filename\fR may be set to \fBNULL\fR and \fI*line_nr\fR to 0\&. Always check if \fI*filename\fR is not \fBNULL\fR before attempting to use or free it\&.
.SH "SEE ALSO"
.PP
\fBeconf_errString\fR(3),
\fBlibeconf\fR(3)