1()                         PMDK Programmer's Manual                         ()
2
3
4

NAME

6       pmem2_errormsg() - returns last error message
7

SYNOPSIS

9              #include <libpmem2.h>
10
11              const char *pmem2_errormsg(void);
12

DESCRIPTION

14       If  an error is detected during the call to a libpmem2(7) function, the
15       application may retrieve an error message describing the reason of  the
16       failure  from pmem2_errormsg().  The error message buffer is thread-lo‐
17       cal; errors encountered in one thread do not affect its value in  other
18       threads.  The buffer is never cleared by any library function; its con‐
19       tent is significant only when the return value of the immediately  pre‐
20       ceding call to a libpmem2(7) function indicated an error.  The applica‐
21       tion must not modify or free  the  error  message  string.   Subsequent
22       calls to other library functions may modify the previous message.
23

RETURN VALUE

25       The pmem2_errormsg() function returns a pointer to a static buffer con‐
26       taining the last error message logged for the current thread.  If errno
27       was set, the error message may include a description of the correspond‐
28       ing error code as returned by strerror(3).
29

SEE ALSO

31       strerror(3), libpmem2(7) and <https://pmem.io>
32
33
34
35PMDK -                            2023-06-05                                ()
Impressum