SystemError 类


Node.js 在其运行时环境中发生异常时会生成系统错误。 这些通常发生在应用程序违反操作系统约束时。 例如,如果应用程序尝试读取不存在的文件,则会发生系统错误。

  • address <string> 如果存在,则为网络连接失败的地址
  • code <string> 字符串错误码
  • dest <string> 如果存在,则为报告文件系统错误时的文件路径目标
  • errno <number> | <string> 系统提供的错误号
  • info <Object> 如果存在,则为关于错误情况的额外细节
  • message <string> 系统提供的人类可读的错误描述
  • path <string> 如果存在,则为报告文件系统错误时的文件路径
  • port <number> 如果存在,则为不可用的网络连接端口
  • syscall <string> 触发错误的系统调用名称

Node.js generates system errors when exceptions occur within its runtime environment. These usually occur when an application violates an operating system constraint. For example, a system error will occur if an application attempts to read a file that does not exist.

  • address <string> If present, the address to which a network connection failed
  • code <string> The string error code
  • dest <string> If present, the file path destination when reporting a file system error
  • errno <number> | <string> The system-provided error number
  • info <Object> If present, extra details about the error condition
  • message <string> A system-provided human-readable description of the error
  • path <string> If present, the file path when reporting a file system error
  • port <number> If present, the network connection port that is not available
  • syscall <string> The name of the system call that triggered the error