errno Macros

The following table lists which error macros the ILE C library functions can set.

Table 1. errno Macros
Error Macro Description Set by Function
EBADDATA The message data is not valid. perror, strerror
EBADF The catalog descriptor is not valid. catclose, catgets, clearerr, fgetc, fgetpos, fgets, fileno, freopen, fseek, fsetpos, getc, rewind
EBADKEYLN The key length specified is not valid. _Rreadk, _Rlocate
EBADMODE The file mode specified is not valid. fopen, freopen, _Ropen
EBADNAME Bad file name specified. fopen, freopen, _Ropen
EBADPOS The position specified is not valid. fsetpos
EBADSEEK Bad offset for a seek operation. fgetpos, fseek
EBUSY The record or file is in use. perror, strerror
ECONVERT Conversion error. wcstomb, wcswidth
EDOM Domain error in math function. acos, asin, atan2, cos, exp, fmod, gamma, hypot, j0, j1, jn, y0, y1, yn, log, log10, pow, sin, strtol, strtoul, sqrt, tan
EGETANDPUT An illegal read operation occurred after a write operation. fgetc, fread, getc, getchar
EILSEQ The character sequence does not form a valid multibyte character. fgetwc, fgetws, getwc, mblen,mbrlen, mbrtowc, mbsrtowcs, mbstowcs, mbtowc, printf, scanf, ungetwc, wcrtomb, wcsrtombs, wcstombs, wctomb, wcswidth, wcwidth
EINVAL The signal is not valid. printf, scanf, signal, swprintf, swscanf, wcstol, wcstoll, wcstoul, wcstoull
EIO Consecutive calls of I⁄O occurred. I⁄O
EIOERROR A non-recoverable I⁄O error occurred. All I⁄O functions
EIORECERR A recoverable I⁄O error occurred. All I⁄O functions
ENODEV Operation attempted on a wrong device. fgetpos, fsetpos, fseek, ftell, rewind
ENOENT File or library is not found. perror, strerror
ENOPOS No record at specified position. fsetpos
ENOREC Record not found. fread, perror, strerror
ENOTDLT File is not opened for delete operations. _Rdelete
ENOTOPEN File is not opened. clearerr, fclose, fflush, fgetpos, fopen, freopen, fseek, ftell, setbuf, setvbuf, _Ropen, _Rclose
ENOTREAD File is not opened for read operations. fgetc, fread, ungetc, _Rreadd, _Rreadf, _Rreadindv, _Rreadk, _Rreadl, _Rreadn, _Rreadnc, _Rreadp, _Rreads, _Rlocate
ENOTUPD File is not opened for update operations. _Rrlslck, _Rupdate
ENOTWRITE File is not opened for write operations. fputc, fwrite, _Rwrite, _Rwrited, _Rwriterd
ENUMMBRS More than 1 member. ftell
ENUMRECS Too many records. ftell
EPAD Padding occurred on a write operation. fwrite
EPERM Insufficient authorization for access. perror, strerror
EPUTANDGET An illegal write operation occurred after a read operation. fputc, fwrite, fputs, putc, putchar
ERANGE Range error in math function. cos, cosh, gamma, exp, j0, j1, jn, y0, y1, yn, log, log10, ldexp, pow, sin, sinh, strtod, strtol, strtoul, tan, wcstol, wcstoll, wcstoul, wcstoull, wcstod, wcstof, wcstold
ERECIO File is opened for record I⁄O, so character-at-a-time processing functions cannot be used. fgetc, fgetpos, fputc, fread, fseek, fsetpos, ftell
ESTDERR stderr cannot be opened. feof, ferror, fgetpos, fputc, fseek, fsetpos, ftell, fwrite
ESTDIN stdin cannot be opened. fgetc, fgetpos, fread, fseek, fsetpos, ftell
ESTDOUT stdout cannot be opened. fgetpos, fputc, fseek, fsetpos, ftell, fwrite
ETRUNC Truncation occurred on I⁄O operation. Any I⁄O function that reads or writes a record sets errno to ETRUNC.