Error code

An error code is generated by computer programs, where the program or a subroutine due to an error message must be canceled. It consists usually of a number, but can also consist of a string. The decisive criterion is the uniqueness of the code, to prevent any confusion.

Well-written software intercepts possible errors by plausibility checks, the check, for example, if parameter passed is complete and correct type, whether certain commands are executed, and whether the return value of the function is permitted. If an error occurs, the triggering event is intercepted, and the function returns an error or abort code back instead of a result by which the cause of the error can be identified by the invokers. An alternative strategy to error codes are exception handling.

The most famous abort code is the so-called 404 -error dead link on the Internet. This is displayed when a web page is not available or not accessible. In operating systems, there are, for example, the blue screen, or kernel panic - the inevitable crash - specified typical error codes (stop error codes), which are delivered directly by the kernel, providing conclusions on the failure reason.

  • Programming
  • User interface