PMEM2_ERRORMSG(3)
β¨ pmem2_errormsg(3) β¨
okay bestie, so this is from the PMDK Programmer's Manual and it's literally the girl who tells you why everything went wrong. π
πΈ NAME πΈ
pmem2_errormsg() β returns last error message
π SYNOPSIS π
#include <libpmem2.h>
const char *pmem2_errormsg(void);
π DESCRIPTION π
So here's the tea, bestie: if an error gets detected during a call to a libpmem2(7) function, your app can go ask pmem2_errormsg() for an error message that describes the reason the thing failed. iconic, honestly. π«Ά
Now listen, because this part is important:
- The error message buffer is thread-local. Errors encountered in one thread do not affect its value in other threads. every thread's got its own little drama, no cap. π
- The buffer is never cleared by any library function. its content is only significant when the return value of the immediately preceding call to a
libpmem2(7)function indicated an error. - The application must not modify or free the error message string. hands off, girl. π
- Subsequent calls to other library functions may modify the previous message. so don't get attached. π
π RETURN VALUE π
pmem2_errormsg() returns a pointer to a static buffer containing the last error message logged for the current thread. π¦
And if errno was set, the error message may include a description of the corresponding error code as returned by strerror(3). cute little collab. β¨
π SEE ALSO π
strerror(3), libpmem2(7) and https://pmem.io
mwah π that's the whole page. this one's from the PMDK crew, dated 2025-07-24 β so go forth, catch your errors, read your messages, and slay. periodt. π β¨
π¦ where this page comes from
- fedora 43: libpmem2-devel 2.1.0-4.fc43 Β· BSD-3-Clause
- π the page's license: BSD-3-Clause
- Copyright 2019, Intel Corporation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms