Class ErrnoError

An error with additional information about what happened

Hierarchy

  • Error
    • ErrnoError

Implements

  • ErrnoException

Constructors

  • Parameters

    • errno: Errno

      The kind of error

    • message: string = ...

      A descriptive error message

    • Optionalpath: string
    • syscall: string = ''

    Returns ErrnoError

Properties

cause?: unknown
code:
    | "EPERM"
    | "ENOENT"
    | "EINTR"
    | "EIO"
    | "ENXIO"
    | "EBADF"
    | "EAGAIN"
    | "ENOMEM"
    | "EACCES"
    | "EFAULT"
    | "ENOTBLK"
    | "EBUSY"
    | "EEXIST"
    | "EXDEV"
    | "ENODEV"
    | "ENOTDIR"
    | "EISDIR"
    | "EINVAL"
    | "ENFILE"
    | "EMFILE"
    | "ETXTBSY"
    | "EFBIG"
    | "ENOSPC"
    | "ESPIPE"
    | "EROFS"
    | "EMLINK"
    | "EPIPE"
    | "EDOM"
    | "ERANGE"
    | "EDEADLK"
    | "ENAMETOOLONG"
    | "ENOLCK"
    | "ENOSYS"
    | "ENOTEMPTY"
    | "ELOOP"
    | "ENOMSG"
    | "EBADE"
    | "EBADR"
    | "EXFULL"
    | "ENOANO"
    | "EBADRQC"
    | "ENOSTR"
    | "ENODATA"
    | "ETIME"
    | "ENOSR"
    | "ENONET"
    | "EREMOTE"
    | "ENOLINK"
    | "ECOMM"
    | "EPROTO"
    | "EBADMSG"
    | "EOVERFLOW"
    | "EBADFD"
    | "ESTRPIPE"
    | "ENOTSOCK"
    | "EDESTADDRREQ"
    | "EMSGSIZE"
    | "EPROTOTYPE"
    | "ENOPROTOOPT"
    | "EPROTONOSUPPORT"
    | "ESOCKTNOSUPPORT"
    | "ENOTSUP"
    | "ENETDOWN"
    | "ENETUNREACH"
    | "ENETRESET"
    | "ETIMEDOUT"
    | "ECONNREFUSED"
    | "EHOSTDOWN"
    | "EHOSTUNREACH"
    | "EALREADY"
    | "EINPROGRESS"
    | "ESTALE"
    | "EREMOTEIO"
    | "EDQUOT"
errno: Errno

The kind of error

message: string
name: string
path?: string
stack: string
syscall: string = ''
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

stackTraceLimit: number

Methods

  • The size of the API error in buffer-form in bytes.

    Returns number

  • Returns string

    A friendly error message.

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

  • Parameters

    • code:
          | "EPERM"
          | "ENOENT"
          | "EINTR"
          | "EIO"
          | "ENXIO"
          | "EBADF"
          | "EAGAIN"
          | "ENOMEM"
          | "EACCES"
          | "EFAULT"
          | "ENOTBLK"
          | "EBUSY"
          | "EEXIST"
          | "EXDEV"
          | "ENODEV"
          | "ENOTDIR"
          | "EISDIR"
          | "EINVAL"
          | "ENFILE"
          | "EMFILE"
          | "ETXTBSY"
          | "EFBIG"
          | "ENOSPC"
          | "ESPIPE"
          | "EROFS"
          | "EMLINK"
          | "EPIPE"
          | "EDOM"
          | "ERANGE"
          | "EDEADLK"
          | "ENAMETOOLONG"
          | "ENOLCK"
          | "ENOSYS"
          | "ENOTEMPTY"
          | "ELOOP"
          | "ENOMSG"
          | "EBADE"
          | "EBADR"
          | "EXFULL"
          | "ENOANO"
          | "EBADRQC"
          | "ENOSTR"
          | "ENODATA"
          | "ETIME"
          | "ENOSR"
          | "ENONET"
          | "EREMOTE"
          | "ENOLINK"
          | "ECOMM"
          | "EPROTO"
          | "EBADMSG"
          | "EOVERFLOW"
          | "EBADFD"
          | "ESTRPIPE"
          | "ENOTSOCK"
          | "EDESTADDRREQ"
          | "EMSGSIZE"
          | "EPROTOTYPE"
          | "ENOPROTOOPT"
          | "EPROTONOSUPPORT"
          | "ESOCKTNOSUPPORT"
          | "ENOTSUP"
          | "ENETDOWN"
          | "ENETUNREACH"
          | "ENETRESET"
          | "ETIMEDOUT"
          | "ECONNREFUSED"
          | "EHOSTDOWN"
          | "EHOSTUNREACH"
          | "EALREADY"
          | "EINPROGRESS"
          | "ESTALE"
          | "EREMOTEIO"
          | "EDQUOT"
    • Optionalpath: string
    • Optionalsyscall: string

    Returns ErrnoError