syscallerror
Source: quickjs-syscallerror.c — module exports SyscallError plus errno constants.
An Error subclass carrying the failing syscall name and errno. Thrown by the
POSIX-style bindings (sockets, misc, …).
Constructor
new SyscallError([syscall, errno]) // length 1Properties (read-only)
| Property | Description |
|---|---|
syscall | Name of the syscall that failed. |
code | Errno symbol such as 'ENOENT' (Node's error.code; same as name). |
errno | Numeric error code. |
message | Human-readable error message. |
name | Error name. |
stack | Captured stack trace. |
Methods
| Method | Args | Description |
|---|---|---|
toString() | 0 | Renders the error as a string (also bound to [Symbol.toPrimitive]). |
Static functions
| Function | Args | Description |
|---|---|---|
errno() | 0 | Returns the current global errno. |
strerror(code) | 0 | Returns the message string for an error code. |
Plus a list of errno value constants (EPERM, ENOENT, …) exported by the module.
Export list
Generated by utilities/doc-api.js from the syscallerror dump of utilities/api-surface.sh: 159 members. Edit the text above this block, not the block.
Values: E2BIG = 7, EACCES = 13, EADDRINUSE = 98, EADDRNOTAVAIL = 99, EAFNOSUPPORT = 97, EAGAIN = 11, EALREADY = 114, EBADF = 9, EBADMSG = 74, EBUSY = 16, ECANCELED = 125, ECHILD = 10, ECONNABORTED = 103, ECONNREFUSED = 111, ECONNRESET = 104, EDEADLK = 35, EDESTADDRREQ = 89, EDOM = 33, EEXIST = 17, EFAULT = 14, EFBIG = 27, EHOSTUNREACH = 113, EIDRM = 43, EILSEQ = 84, EINPROGRESS = 115, EINTR = 4, EINVAL = 22, EIO = 5, EISCONN = 106, EISDIR = 21, EMFILE = 24, EMLINK = 31, EMSGSIZE = 90, ENAMETOOLONG = 36, ENETDOWN = 100, ENETRESET = 102, ENETUNREACH = 101, ENFILE = 23, ENOBUFS = 105, ENODEV = 19, ENOENT = 2, ENOEXEC = 8, ENOLCK = 37, ENOLINK = 67, ENOMEM = 12, ENOMSG = 42, ENOPROTOOPT = 92, ENOSPC = 28, ENOSYS = 38, ENOTCONN = 107, ENOTDIR = 20, ENOTEMPTY = 39, ENOTRECOVERABLE = 131, ENOTSOCK = 88, ENOTTY = 25, ENXIO = 6, EOPNOTSUPP = 95, EOVERFLOW = 75, EOWNERDEAD = 130, EPERM = 1, EPIPE = 32, EPROTO = 71, EPROTONOSUPPORT = 93, EPROTOTYPE = 91, ERANGE = 34, ERESTART = 85, EROFS = 30, ESPIPE = 29, ESRCH = 3, ETIMEDOUT = 110, ETXTBSY = 26, EWOULDBLOCK = 11, EXDEV = 18
SyscallError
class, constructible
- static methods:
errno(),strerror() - static values:
E2BIG = 7,EACCES = 13,EADDRINUSE = 98,EADDRNOTAVAIL = 99,EAFNOSUPPORT = 97,EAGAIN = 11,EALREADY = 114,EBADF = 9,EBADMSG = 74,EBUSY = 16,ECANCELED = 125,ECHILD = 10,ECONNABORTED = 103,ECONNREFUSED = 111,ECONNRESET = 104,EDEADLK = 35,EDESTADDRREQ = 89,EDOM = 33,EEXIST = 17,EFAULT = 14,EFBIG = 27,EHOSTUNREACH = 113,EIDRM = 43,EILSEQ = 84,EINPROGRESS = 115,EINTR = 4,EINVAL = 22,EIO = 5,EISCONN = 106,EISDIR = 21,EMFILE = 24,EMLINK = 31,EMSGSIZE = 90,ENAMETOOLONG = 36,ENETDOWN = 100,ENETRESET = 102,ENETUNREACH = 101,ENFILE = 23,ENOBUFS = 105,ENODEV = 19,ENOENT = 2,ENOEXEC = 8,ENOLCK = 37,ENOLINK = 67,ENOMEM = 12,ENOMSG = 42,ENOPROTOOPT = 92,ENOSPC = 28,ENOSYS = 38,ENOTCONN = 107,ENOTDIR = 20,ENOTEMPTY = 39,ENOTRECOVERABLE = 131,ENOTSOCK = 88,ENOTTY = 25,ENXIO = 6,EOPNOTSUPP = 95,EOVERFLOW = 75,EOWNERDEAD = 130,EPERM = 1,EPIPE = 32,EPROTO = 71,EPROTONOSUPPORT = 93,EPROTOTYPE = 91,ERANGE = 34,ERESTART = 85,EROFS = 30,ESPIPE = 29,ESRCH = 3,ETIMEDOUT = 110,ETXTBSY = 26,EWOULDBLOCK = 11,EXDEV = 18 - methods:
toString(),[Symbol.toPrimitive]() - properties:
code (get),errno (get),message (get),name (get),stack (get),syscall (get),[Symbol.toStringTag]