Error code: Difference between revisions

Content deleted Content added
Added content, compared error codes to exceptions.
m see talk
Line 1:
In [[Programming language|computer programming]], '''error codes''' are numbered messages that correspond to faults in a specific [[software application]], which can be caused by faulty [[hardware]], [[software]], or incorrect user input. '''Error codes''' are not to be confused with [[return code|return codes]] though the latter are commonly used in error handling. Some of the most common error codes visible to users are the "[[Blue Screen of Death]]" codes provided by the [[Microsoft Windows]] [[operating system]].
 
Error codes are often process global variables, such as ''errno'' in C. A return code from a function will indicate an error condition (such as -1 bytes read from a file) and the programmer can then check the value of ''errno'' against a list of possible errors to determine why the function call failed.