Error code: Difference between revisions

Content deleted Content added
Undid revision 1162361030 by 47.36.212.181 (talk) - rv randomness
No edit summary
Tags: Visual edit Mobile edit Mobile web edit
Line 2:
{{Distinguish|Error correction code}}
 
In[[Error detection and correction|Error]]<ref name=":0" /><ref name=":1" /> [[computing]], an '''error code''' (or a '''return code''') is a numeric or [[Alphanumericals|alphanumeric]] code that indicates the nature of an error and, when possible, why it occurred.<ref>{{Cite web|url=https://www.computerhope.com/jargon/e/errorcode.htm|title=What is an Error Code?|website=ComputerHope.com |access-date=2020-01-22}}</ref> Error codes can be reported to end users of software, returned from [[Communication protocol|communication protocols]], or used within programs as a method of representing anomalous conditions.
 
== In consumer products ==
Line 19:
 
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 call]]s and library functions.<ref>{{man|2|intro|v7}}</ref><ref name=":0">{{man|3|errno|Linux}}</ref><ref>{{man|2|intro|Solaris}}</ref>
* [[Windows API|Microsoft Windows' application programming interfaces (APIs)]] have several different standards for error code values, depending on the specific API being used.<ref>{{Cite web |title=[MS-ERREF]: Overview |url=https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/774ca55e-5e94-49ad-8710-c777fc717599 |access-date=2023-03-12 |website=learn.microsoft.com }}</ref>
 
The usage of error codes as an error handling strategy is often contrasted against using [[Exception handling|exceptions]] for error handling.<ref>{{Cite web |last=TylerMSFT |title=Modern C++ best practices for exceptions and error handling |url=https://learn.microsoft.com/en-us/cpp/cpp/errors-and-exception-handling-modern-cpp |access-date=2023-03-12 |website=Learn.Microsoft.com }}</ref><ref name=":1">{{Cite web |title=Standard C++ |url=https://isocpp.org/wiki/faq/exceptions#exceptions-avoid-spreading-out-error-logic |access-date=2023-03-12 |website=IsoCpp.org }}</ref>
 
==In communication protocols==