system error code

A short name, such as ENOENT or EMFILE, that the operating system uses to say why a request failed.

In more detail

Code can react to specific cases, for example treating ENOENT (file not found) differently from EACCES (permission denied). Each code also has a number, and the error message is a short human-readable version of it.

Example

Node.js puts it on error.code, so a failed open has err.code === "ENOENT".

Related terms

Taught in

References