'\" -*- coding: UTF-8 -*- .if \n(.g .ds T< \\FC .if \n(.g .ds T> \\F[\n[.fam]] .de URL \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac .TH sg_set_error 3 2019-03-08 libstatgrab "" .SH NAME sg_set_error, sg_set_error_with_errno, sg_set_error_with_errno_code, sg_clear_error \- sets the error condition .SH SYNOPSIS 'nh .nf \*(T<#include \*(T> .fi .sp 1 .PP .fi .ad l \*(T \kx .if (\nx>(\n(.l/2)) .nr x (\n(.l/5) 'in \n(.iu+\nxu \*(T<(sg_error \fIcode\fR, const char *\fIarg\fR);\*(T> 'in \n(.iu-\nxu .ad b .PP .fi .ad l \*(T \kx .if (\nx>(\n(.l/2)) .nr x (\n(.l/5) 'in \n(.iu+\nxu \*(T<(sg_error \fIcode\fR, const char *\fIarg\fR);\*(T> 'in \n(.iu-\nxu .ad b .PP .fi .ad l \*(T \kx .if (\nx>(\n(.l/2)) .nr x (\n(.l/5) 'in \n(.iu+\nxu \*(T<(sg_error \fIcode\fR, const char *\fIarg\fR, int \fIerrno_value\fR);\*(T> 'in \n(.iu-\nxu .ad b .PP .fi .ad l \*(T \kx .if (\nx>(\n(.l/2)) .nr x (\n(.l/5) 'in \n(.iu+\nxu \*(T<(void);\*(T> 'in \n(.iu-\nxu .ad b 'hy .SH DESCRIPTION \*(T<\fBsg_set_error\fR\*(T>() sets the occurred error condition together with an argument. The argument is usually descriptive, eg. the file name which failed to open. .PP \*(T<\fBsg_set_error_with_errno\fR\*(T>() sets the occurred error condition together with an argument and the value of the system libraries \*(T value. The argument is usually descriptive, eg. the name of the failed \*(T<\fBsysctl\fR\*(T>() call. .PP \*(T<\fBsg_set_error_with_errno_code\fR\*(T>() sets the occurred error condition together with an argument and an error value of a system library call which doesn't set the \*(T value (eg. the pthread_* calls). The argument is usually descriptive, eg. the name of the mutex failed to get locked. .PP \*(T<\fBsg_clear_error\fR\*(T>() clears the current error condition. .SH "SEE ALSO" \fBstatgrab\fR(3) .SH WEBSITE \(lahttps://libstatgrab.org/\(ra