1sg_set_error(3)                                                sg_set_error(3)
2
3
4

NAME

6       sg_set_error,   sg_set_error_with_errno,  sg_set_error_with_errno_code,
7       sg_clear_error - sets the error condition
8

SYNOPSIS

10       #include <statgrab.h>
11
12
13       sg_error sg_set_error (sg_error code, const char *arg);
14
15       sg_error sg_set_error_with_errno (sg_error code, const char *arg);
16
17       sg_error sg_set_error_with_errno_code (sg_error code, const char *arg,
18                                             int errno_value);
19
20       void sg_clear_error (void);
21

DESCRIPTION

23       sg_set_error() sets the occurred error condition together with an argu‐
24       ment. The argument is usually descriptive, eg.   the  file  name  which
25       failed to open.
26
27       sg_set_error_with_errno()  sets  the  occurred error condition together
28       with an argument and the value of the system libraries errno value. The
29       argument  is  usually  descriptive, eg. the name of the failed sysctl()
30       call.
31
32       sg_set_error_with_errno_code() sets the occurred  error  condition  to‐
33       gether  with  an  argument  and an error value of a system library call
34       which doesn't set the errno value (eg. the pthread_* calls). The  argu‐
35       ment  is  usually  descriptive, eg. the name of the mutex failed to get
36       locked.
37
38       sg_clear_error() clears the current error condition.
39

SEE ALSO

41       statgrab(3)
42

WEBSITE

44https://libstatgrab.org/
45
46
47
48libstatgrab                       2019-03-08                   sg_set_error(3)
Impressum