sg_set_error(3)

NAME
sg_set_error, sg_set_error_with_errno, sg_set_error_with_errno_code, sg_clear_error - sets the error condition

SYNOPSIS
\FC#include <statgrab.h>\F[]

\FCsg_error sg_set_error\F[]
\FC(sg_error code, const char *arg);\F[]

\FCsg_error sg_set_error_with_errno\F[]
\FC(sg_error code, const char *arg);\F[]

\FCsg_error sg_set_error_with_errno_code\F[]
\FC(sg_error code, const char *arg, int errno_value);\F[]

\FCvoid sg_clear_error\F[]
\FC(void);\F[]

DESCRIPTION
\FCsg_set_error\F[]() sets the occurred error condition together with an argument. The argument is usually descriptive, eg. the file name which failed to open.

\FCsg_set_error_with_errno\F[]() sets the occurred error condition together with an argument and the value of the system libraries \FCerrno\F[] value. The argument is usually descriptive, eg. the name of the failed \FCsysctl\F[]() call.

\FCsg_set_error_with_errno_code\F[]() sets the occurred error condition together with an argument and an error value of a system library call which doesn't set the \FCerrno\F[] value (eg. the pthread_* calls). The argument is usually descriptive, eg. the name of the mutex failed to get locked.

\FCsg_clear_error\F[]() clears the current error condition.

SEE ALSO
statgrab(3)

WEBSITE
⟨https://libstatgrab.org/⟩