strerrordesc_np, strerrorname_np - get error name and message strings
#include <string.h> const char *strerrordesc_np(int errnum);
const char *strerrorname_np(int errnum);
The strerrordesc_np() function maps the error number in errnum to the corresponding error message string. It differs from the standard strerror() function in 2 respects: The returned string is not translated according to the current locale, and strerrordesc_np() returns a NULL result for unknown error codes, rather than a generated descriptive string. See strerror(3C).
The strerrorname_np() function maps the error number in errnum to the corresponding error name. For example, given EPERM, strerrorname_np() returns a pointer to the string "EPERM".
Upon successful completion, strerrordesc_np() returns a pointer to the error message string. It returns NULL if errnum is not a valid error number.
Upon successful completion, strerrorname_np() returns a pointer to the error name string. It returns NULL if errnum is not a valid error number.
The strings returned from these functions are not localized, and are unaffected by the native language specified by the LC_MESSAGES locale category.
See attributes(7) for descriptions of the following attributes:
|
Intro(2), perror(3C), strerror(3C)
The strerrordesc_np() and strerrorname_np() functions were defined in GNU glibc 2.32, and were added to Oracle Solaris in the Oracle Solaris 11.4.30 release.