qh_strerror()

Updated: April 19, 2023

Convert an error number into an error message and guarantee that errno is kept intact in the process

Synopsis:

#include <qh/error.h>
const char* qh_strerror(int errno)

Arguments:

errno
The error number that you want the message for.

Library:

qh

Description:

This function simply makes use of strerror(), but guarantees that errno is the same on the way out of the function as it was on the way in.

Do not modify the returned string.

Returns:

A pointer to the error message.