Error codes in computers can be passed to the system itself, to judge how to respond to the error. Often error codes come synonymous with an
exit code or a return value. The system may also choose to pass the error code to its user(s). The
Blue screen of death is an example of how the
Windows operating system communicates error codes to the user. Error codes can be used within a computer program to represent an anomalous condition. A computer program can take different actions depending on the value of an error code. Different programming languages, operating systems, and programming environments often have their own conventions and standards for the meanings and values of error codes. Examples include: •
Unix-like systems have an
errno.h header file that contains the meanings and values of error codes returned by
system calls and library functions. •
Microsoft Windows' application programming interfaces (APIs) have several different standards for error code values, depending on the specific API being used. The usage of error codes as an error handling strategy is often contrasted against using
exceptions for error handling. ==In communication protocols==