Enum

error-code

Error codes returned by functions, similar to errno in POSIX. Not all of these error codes are returned by the functions provided by this API; some are used in higher-level library layers, and others are provided merely for alignment with POSIX.

enum error-code {
  access,
  would-block,
  already,
  bad-descriptor,
  busy,
  deadlock,
  quota,
  exist,
  file-too-large,
  illegal-byte-sequence,
  in-progress,
  interrupted,
  invalid,
  io,
  is-directory,
  loop,
  too-many-links,
  message-size,
  name-too-long,
  no-device,
  no-entry,
  no-lock,
  insufficient-memory,
  insufficient-space,
  not-directory,
  not-empty,
  not-recoverable,
  unsupported,
  no-tty,
  no-such-device,
  overflow,
  not-permitted,
  pipe,
  read-only,
  invalid-seek,
  text-file-busy,
  cross-device,
}

Cases

CaseDescription
accessPermission denied, similar to EACCES in POSIX.
would-blockResource unavailable, or operation would block, similar to EAGAIN and EWOULDBLOCK in POSIX.
alreadyConnection already in progress, similar to EALREADY in POSIX.
bad-descriptorBad descriptor, similar to EBADF in POSIX.
busyDevice or resource busy, similar to EBUSY in POSIX.
deadlockResource deadlock would occur, similar to EDEADLK in POSIX.
quotaStorage quota exceeded, similar to EDQUOT in POSIX.
existFile exists, similar to EEXIST in POSIX.
file-too-largeFile too large, similar to EFBIG in POSIX.
illegal-byte-sequenceIllegal byte sequence, similar to EILSEQ in POSIX.
in-progressOperation in progress, similar to EINPROGRESS in POSIX.
interruptedInterrupted function, similar to EINTR in POSIX.
invalidInvalid argument, similar to EINVAL in POSIX.
ioI/O error, similar to EIO in POSIX.
is-directoryIs a directory, similar to EISDIR in POSIX.
loopToo many levels of symbolic links, similar to ELOOP in POSIX.
too-many-linksToo many links, similar to EMLINK in POSIX.
message-sizeMessage too large, similar to EMSGSIZE in POSIX.
name-too-longFilename too long, similar to ENAMETOOLONG in POSIX.
no-deviceNo such device, similar to ENODEV in POSIX.
no-entryNo such file or directory, similar to ENOENT in POSIX.
no-lockNo locks available, similar to ENOLCK in POSIX.
insufficient-memoryNot enough space, similar to ENOMEM in POSIX.
insufficient-spaceNo space left on device, similar to ENOSPC in POSIX.
not-directoryNot a directory or a symbolic link to a directory, similar to ENOTDIR in POSIX.
not-emptyDirectory not empty, similar to ENOTEMPTY in POSIX.
not-recoverableState not recoverable, similar to ENOTRECOVERABLE in POSIX.
unsupportedNot supported, similar to ENOTSUP and ENOSYS in POSIX.
no-ttyInappropriate I/O control operation, similar to ENOTTY in POSIX.
no-such-deviceNo such device or address, similar to ENXIO in POSIX.
overflowValue too large to be stored in data type, similar to EOVERFLOW in POSIX.
not-permittedOperation not permitted, similar to EPERM in POSIX.
pipeBroken pipe, similar to EPIPE in POSIX.
read-onlyRead-only file system, similar to EROFS in POSIX.
invalid-seekInvalid seek, similar to ESPIPE in POSIX.
text-file-busyText file busy, similar to ETXTBSY in POSIX.
cross-deviceCross-device link, similar to EXDEV in POSIX.