errnobased
Errnobased is a term used in software engineering to describe error-handling approaches that rely primarily on the errno mechanism to signal and convey error conditions. In this approach, library and system calls typically return a value indicating success or failure, and, on failure, set a global or thread-local error variable (errno) to a identifying error code from the errno.h set. Programs may then inspect the return value and, if needed, examine errno or translate it to a human-readable message via functions such as strerror.
The concept is most closely associated with C and POSIX interfaces, where many functions adhere to a
Advantages of an errnobased approach include low overhead and strong compatibility with legacy C APIs, as well
Origin and usage: the term derives from errno, the conventional error indicator in C, with the suffix