{ } qjs-modules

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 1

Properties (read-only)

PropertyDescription
syscallName of the syscall that failed.
errnoNumeric error code.
messageHuman-readable error message.
nameError name.
stackCaptured stack trace.

Methods

MethodArgsDescription
toString()0Renders the error as a string (also bound to [Symbol.toPrimitive]).

Static functions

FunctionArgsDescription
errno()0Returns the current global errno.
strerror(code)0Returns the message string for an error code.

Plus a list of errno value constants (EPERM, ENOENT, …) exported by the module.