The header file errno.h
consists of macros that provide
error codes that are reported by certain library functions (see individual functions).
The variable errno
may return any value greater than zero. To test if a
library function encounters an error, the program should store the zero value in
errno
immediately before calling the library function. The value
should be checked before another function call could change the value. At program
start-up, errno
is zero. Library functions will never set
errno
to zero.
Represents a domain error.
Include
<errno.h>
Remarks
EDOM
represents a domain error, which occurs when an
input argument is outside the domain in which the function is defined.
Represents a wide character encoding error.
Include
<errno.h>
Remarks
EILSEQ
represents a wide character encoding error, when
the character sequence presented to the underlying mbrtowc
function
does not form a valid (generalized) multibyte character, or if the code value passed
to the underlying wcrtomb
does not correspond to a valid
(generalized) overflow or underflow error, which occurs when a result is too large
or too small to be stored.
Represents an overflow or underflow error.
Include
<errno.h>
Remarks
ERANGE
represents an overflow or underflow error, which
occurs when a result is too large or too small to be stored.
Contains the value of an error when an error occurs in a function.
Include
<errno.h>
Remarks
The variable errno
is set to a non-zero integer value
by a library function when an error occurs. At program start-up,
errno
is set to zero. errno
should be reset to
zero prior to calling a function that sets it.