From a78439ce2a0ccfc5d8003397ea6db58c8957ebf3 Mon Sep 17 00:00:00 2001 From: Mike <10135646+mikesmithgh@users.noreply.github.com> Date: Thu, 16 Mar 2023 17:20:25 -0400 Subject: [PATCH] uv: add uv.errno --- library/uv.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/library/uv.lua b/library/uv.lua index 442d49d..f19b49f 100644 --- a/library/uv.lua +++ b/library/uv.lua @@ -3705,4 +3705,18 @@ function uv.metrics_idle_time() end ---@type uv.constants uv.constants = {} +-- [[ errorno ]] + +---@alias uv.errno {E2BIG : integer, EACCES : integer, EADDRINUSE : integer, EADDRNOTAVAIL : integer, EAFNOSUPPORT : integer, EAGAIN : integer, EAI_ADDRFAMILY : integer, EAI_AGAIN : integer, EAI_BADFLAGS : integer, EAI_BADHINTS : integer, EAI_CANCELED : integer, EAI_FAIL : integer, EAI_FAMILY : integer, EAI_MEMORY : integer, EAI_NODATA : integer, EAI_NONAME : integer, EAI_OVERFLOW : integer, EAI_PROTOCOL : integer, EAI_SERVICE : integer, EAI_SOCKTYPE : integer, EALREADY : integer, EBADF : integer, EBUSY : integer, ECANCELED : integer, ECHARSET : integer, ECONNABORTED : integer, ECONNREFUSED : integer, ECONNRESET : integer, EDESTADDRREQ : integer, EEXIST : integer, EFAULT : integer, EFBIG : integer, EFTYPE : integer, EHOSTDOWN : integer, EHOSTUNREACH : integer, EILSEQ : integer, EINTR : integer, EINVAL : integer, EIO : integer, EISCONN : integer, EISDIR : integer, ELOOP : integer, EMFILE : integer, EMLINK : integer, EMSGSIZE : integer, ENAMETOOLONG : integer, ENETDOWN : integer, ENETUNREACH : integer, ENFILE : integer, ENOBUFS : integer, ENODATA : integer, ENODEV : integer, ENOENT : integer, ENOMEM : integer, ENONET : integer, ENOPROTOOPT : integer, ENOSPC : integer, ENOSYS : integer, ENOTCONN : integer, ENOTDIR : integer, ENOTEMPTY : integer, ENOTSOCK : integer, ENOTSUP : integer, ENOTTY : integer, ENXIO : integer, EOF : integer, EOVERFLOW : integer, EPERM : integer, EPIPE : integer, EPROTO : integer, EPROTONOSUPPORT : integer, EPROTOTYPE : integer, ERANGE : integer, EREMOTEIO : integer, EROFS : integer, ESHUTDOWN : integer, ESOCKTNOSUPPORT : integer, ESPIPE : integer, ESRCH : integer, ETIMEDOUT : integer, ETXTBSY : integer, EXDEV : integer, UNKNOWN : integer} + +---A table value which exposes error constants as a map, where the key is the +---error name (without the `UV_` prefix) and its value is a negative number. +---See Libuv's "Error constants" page for further details. +---(https://docs.libuv.org/en/v1.x/errors.html#error-constants) +--- +---Note: Implementation detail: on Unix error codes are the negated errno (or -errno), +---while on Windows they are defined by libuv to arbitrary negative numbers. +---@type uv.errno +uv.errno = {} + return uv