comment: <> (SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT) comment: <> (LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,) comment: <> (DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY) comment: <> (THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT) comment: <> ((INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE) comment: <> (OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.)
comment: <> (pmem2_errormsg.3 – man page for error handling in libpmem2
pmem2_errormsg() - returns last error message
#include <libpmem2.h> const char *pmem2_errormsg(void);
If an error is detected during the call to a libpmem2(7) function, the application may retrieve an error message describing the reason of the failure from pmem2_errormsg(). The error message buffer is thread-local; errors encountered in one thread do not affect its value in other threads. The buffer is never cleared by any library function; its content is significant only 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. Subsequent calls to other library functions may modify the previous message.
The pmem2_errormsg() function returns a pointer to a static buffer containing the last error message logged for the current thread. If errno was set, the error message may include a description of the corresponding error code as returned by strerror(3).
strerror(3), libpmem2(7) and http://pmem.io
The contents of this web site and the associated GitHub repositories are BSD-licensed open source.