Error code

In computer programming, a return code or an error code is a numbered or alphanumeric code that is used to determine the nature of an error, and why it occurred.[1] In C programming you can find many error codes defined under the header file <error.h>. They are also commonly found in consumer electronics and devices when these attempt to do something it can't do (ie, dividing by zero). They can also passed off to error handlers that determine what action to take.

In consumer products

Error E74 on the Xbox 360, symbolizing a hardware failure.

Error codes can also be used to specify an error, and simplify research into the cause and how to fix it. This is commonly used by consumer products when something goes wrong, such as the cause of a Blue Screen of Death, to make it easier to pinpoint the exact problem the product is having.

There is no definitive form of an error code. Some styles use decimal or hexidecimal numbers. Others use alphanumeric codes, while others use a phrase describing the error.

In computing

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.

In networking software

Network protocols typically support returning status codes. In the TCP/IP stack, it's a common feature of higher level protocols. For example:

Error codes and exception handling

Error codes are passed to exception handling in programming languages that support it. These are passed to log files and the parent process to determine what action to take.

gollark: SPUDNET = "Super PotatOS Update/Debug NETwork", allegedly.
gollark: I use JS for my small projects. I feel like it works better.
gollark: SPUDNET is probably an acronym for something.
gollark: Featuring between 0 and 1041058 exploits, possible GDPR compliance, backwards compatibility compatibility, transparent 5rot26 encryption, sandboxing, SPUDNET and skynet connectivity, and auto-update!
gollark: https://pastebin.com/RM13UGFa, my "OS".

See also

References

  1. "What is an Error Code?". www.computerhope.com. Retrieved 2020-01-22.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.