Error codes common exit codes

From Wikipedia, the free encyclopedia

From Wikipedia, the free encyclopedia

«Exit code» redirects here. For the prefix used to place an international telephone call, see International call prefix.

«Result code» redirects here. For the result code of software in general, see Return code.

The exit status of a process in computer programming is a small number passed from a child process (or callee) to a parent process (or caller) when it has finished executing a specific procedure or delegated task. In DOS, this may be referred to as an errorlevel.

When computer programs are executed, the operating system creates an abstract entity called a process in which the book-keeping for that program is maintained. In multitasking operating systems such as Unix or Linux, new processes can be created by active processes. The process that spawns another is called a parent process, while those created are child processes. Child processes run concurrently with the parent process. The technique of spawning child processes is used to delegate some work to a child process when there is no reason to stop the execution of the parent. When the child finishes executing, it exits by calling the exit system call. This system call facilitates passing the exit status code back to the parent, which can retrieve this value using the wait system call.

Semantics[edit]

The parent and the child can have an understanding about the meaning of the exit statuses. For example, it is common programming practice for a child process to return (exit with) zero to the parent signifying success. Apart from this return value from the child, other information like how the process exited, either normally or by a signal may also be available to the parent process.

The specific set of codes returned is unique to the program that sets it. Typically it indicates success or failure. The value of the code returned by the function or program may indicate a specific cause of failure. On many systems, the higher the value, the more severe the cause of the error.[1] Alternatively, each bit may indicate a different condition, with these being evaluated by the or operator together to give the final value; for example, fsck does this.

Sometimes, if the codes are designed with this purpose in mind, they can be used directly as a branch index upon return to the initiating program to avoid additional tests.

AmigaOS[edit]

In AmigaOS, MorphOS and AROS, four levels are defined:

  • OK 0
  • WARN 5
  • ERROR 10
  • FAILURE 20

Shell and scripts[edit]

Shell scripts typically execute commands and capture their exit statuses.

For the shell’s purposes, a command which exits with a zero exit status has succeeded. A nonzero exit status indicates failure. This seemingly counter-intuitive scheme is used so there is one well-defined way to indicate success and a variety of ways to indicate various failure modes. When a command is terminated by a signal whose number is N, a shell sets the variable $? to a value greater than 128. Most shells use 128+N, while ksh93 uses 256+N.

If a command is not found, the shell should return a status of 127. If a command is found but is not executable, the return status should be 126.[2] Note that this is not the case for all shells.

If a command fails because of an error during expansion or redirection, the exit status is greater than zero.

C language[edit]

The C programming language allows programs exiting or returning from the main function to signal success or failure by returning an integer, or returning the macros EXIT_SUCCESS and EXIT_FAILURE. On Unix-like systems these are equal to 0 and 1 respectively.[3] A C program may also use the exit() function specifying the integer status or exit macro as the first parameter.

The return value from main is passed to the exit function, which for values zero, EXIT_SUCCESS or EXIT_FAILURE may translate it to “an implementation defined form” of successful termination or unsuccessful termination.

Apart from zero and the macros EXIT_SUCCESS and EXIT_FAILURE, the C standard does not define the meaning of return codes. Rules for the use of return codes vary on different platforms (see the platform-specific sections).

DOS[edit]

In DOS terminology, an errorlevel is an integer exit code returned by an executable program or subroutine. Errorlevels typically range from 0 to 255.[4][5][6][7] In DOS there are only 256 error codes available, but DR DOS 6.0 and higher support 16-bit error codes at least in CONFIG.SYS.[6] With 4DOS and DR-DOS COMMAND.COM, exit codes (in batchjobs) can be set by EXIT n[6] and (in CONFIG.SYS) through ERROR=n.[6]

Exit statuses are often captured by batch programs through IF ERRORLEVEL commands.[4][6] Multiuser DOS supports a reserved environment variable %ERRORLVL% which gets automatically updated on return from applications. COMMAND.COM under DR-DOS 7.02 and higher supports a similar pseudo-environment variable %ERRORLVL% as well as %ERRORLEVEL%. In CONFIG.SYS, DR DOS 6.0 and higher supports ONERROR to test the load status and return code of device drivers and the exit code of programs.[6]

Java[edit]

In Java, any method can call System.exit(int status), unless a security manager does not permit it. This will terminate the currently running Java Virtual Machine. «The argument serves as a status code; by convention, a nonzero status code indicates abnormal termination.»[8]

OpenVMS[edit]

In OpenVMS, success is indicated by odd values and failure by even values.
The value is a 32 bit integer with sub-fields: control bits, facility number, message number and severity. Severity values are divided between success (Success, Informational) and failure (Warning, Error, Fatal).[9]

POSIX[edit]

In Unix and other POSIX-compatible systems, the parent process can retrieve the exit status of a child process using the wait() family of system calls defined in wait.h.[10] Of these, the waitid() [11] call retrieves the full 32-bit exit status, but the older wait() and waitpid() [12] calls retrieve only the least significant 8 bits of the exit status.

The wait() and waitpid() interfaces set a status value of type int packed as a bitfield with various types of child termination information. If the child terminated by exiting (as determined by the WIFEXITED() macro; the usual alternative being that it died from an uncaught signal), SUS specifies that the low-order 8 bits of the exit status can be retrieved from the status value using the WEXITSTATUS() macro.

In the waitid() system call (added with SUSv1), the child exit status and other information are no longer in a bitfield but in the structure of type siginfo_t.[13]

POSIX-compatible systems typically use a convention of zero for success and nonzero for error.[14] Some conventions have developed as to the relative meanings of various error codes; for example GNU recommend that codes with the high bit set be reserved for serious errors.[3]

BSD-derived OS’s have defined an extensive set of preferred interpretations: Meanings for 15 status codes 64 through 78 are defined in sysexits.h.[15] These historically derive from sendmail and other message transfer agents, but they have since found use in many other programs.[16]

For portability reasons, glibc defines the macros EXIT_SUCCESS and EXIT_FAILURE. The Advanced Bash-Scripting Guide and /usr/include/sysexits.h have some information on the meaning of non-0 exit status codes.[17]

Windows[edit]

Windows uses 32-bit unsigned integers as exit codes,[18][19] although the command interpreter treats them as signed.[20]

Exit codes are directly referenced, for example, by the command line interpreter CMD.exe in the errorlevel terminology inherited from DOS. .NET Framework processes and the Windows PowerShell refer to it as the ExitCode property of the Process object.

See also[edit]

  • Error code
  • Return statement
  • true and false (commands)

References[edit]

  1. ^ «Errorlevels». Rob van der Woude’s Scripting Pages. Retrieved 2007-08-26.
  2. ^ «Shell command language — Exit Status for commands». The Open Group. Retrieved 2015-07-07.
  3. ^ a b «The GNU C Library Reference Manual 25.6.2: Exit Status». Gnu.org. Retrieved 2012-07-09.
  4. ^ a b Paul, Matthias R. (1997-05-01) [1993-10-01]. BATTIPs — Tips & Tricks zur Programmierung von Batchjobs. MPDOSTIP (in German). 7: ERRORLEVEL abfragen. Archived from the original on 2017-08-23. Retrieved 2017-08-23. [1] [2] (NB. BATTIPS.TXT is part of MPDOSTIP.ZIP. The provided link points to a HTML-converted older version of the BATTIPS.TXT file.) [3]
  5. ^ Auer, Eric; Paul, Matthias R.; Hall, Jim (2015-12-24) [2003-12-31]. «MS-DOS errorlevels». Archived from the original on 2015-12-24.
  6. ^ a b c d e f Paul, Matthias R. (1997-07-30) [1994-05-01]. NWDOS-TIPs — Tips & Tricks rund um Novell DOS 7, mit Blick auf undokumentierte Details, Bugs und Workarounds. MPDOSTIP. Release 157 (in German) (3 ed.). Archived from the original on 2016-11-04. Retrieved 2014-08-06. (NB. NWDOSTIP.TXT is a comprehensive work on Novell DOS 7 and OpenDOS 7.01, including the description of many undocumented features and internals. The provided link points to a HTML-converted version of the file, which is part of the MPDOSTIP.ZIP collection.) [4]
  7. ^ Allen, William; Allen, Linda. «Windows 95/98/ME ERRORLEVELs». Archived from the original on 2011-07-07.
  8. ^ «Java 1.6.0 API». Sun Microsystems. Retrieved 2008-05-06.
  9. ^ «OpenVMS Format of Return Status Values». H71000.www7.hp.com. Archived from the original on 2012-03-19. Retrieved 2012-07-09.
  10. ^ sys_wait.h – Base Definitions Reference, The Single UNIX Specification, Version 4 from The Open Group
  11. ^ waitid – System Interfaces Reference, The Single UNIX Specification, Version 4 from The Open Group
  12. ^ wait – System Interfaces Reference, The Single UNIX Specification, Version 4 from The Open Group
  13. ^ «2.4.3 Signal Actions». The Open Group. Retrieved 2019-02-08.
  14. ^ «Chapter 6. Exit and Exit Status». Faqs.org. Retrieved 2012-07-09.
  15. ^ sysexits(3): preferable exit codes for programs – FreeBSD Library Functions Manual
  16. ^ Google search for «»sysexits.h» site:github.com» reports «About 3,540 results»; retrieved 2013-02-21.
  17. ^ «Exit Codes with Special Meanings».
  18. ^ «ExitProcess function». Retrieved 2016-12-16.
  19. ^ «GetExitCodeProcess function». Retrieved 2022-04-22.
  20. ^ «ExitCodes bigger than 255, possible?». Retrieved 2009-09-28.

Matthew AdamsBy Matthew Adams 🕤 Updated on January 27, 2023 at 9:30 am

YouTube video · Monitor an FTP server & send file via email

Automation Workshop monitors files and folders on local & network or remote servers like Amazon S3 and SFTP, and executes Actions when files or folders are created, modified, or deleted according to defined conditions · Getting started · See more Automation videos

Let’s debug… the codes

Automation Workshop is a versatile tool that can handle complex automation scenarios including launching external apps therefore advanced error handling and debug capability is an essential part of process automation. Some Run Actions may complete with errorlevels or exit codes…

  • Run CMD Command · Advanced · Variables · Events 68000, 68002, 68202, and 68402
  • Start App · Advanced · Variables · Events 67000, 67002, 67202, and 67402
  • Terminate App · Options · Variables · Events 420000, 420001, and 420400
  • Remote FTP Command · Options · Variables · Events 338000 and 338402
  • Remote SSH Command · Options · Variables · Events 337000 and 337402

…that indicate the termination status of executed Command or Application.

Exit codes

Program exit codes allow determining the specific reason for command’s or application’s termination. Although Automation Workshop shows codes in decimal format, they are also referred to as hexadecimal or negative decimal values.

Decisiveness on program exit codes

Code 0

Program successfully completed.

Code 1

Incorrect function.
Indicates that Action has attempted to execute non-recognized command in Windows command prompt cmd.exe.

Code 2

The system cannot find the file specified.
Indicates that the file can not be found in the specified location. Most likely the folder structure / path is configured correctly, however the file name is either misspelled or file is missing.

Code 3

The system cannot find the path specified.
Indicates that the specified path can not be found.

Code 4

The system cannot open the file.
A path to the file is specified correctly, however, the user credentials do not contain necessary permissions to the specified resource. Use Run As feature to grant access to a local file or network path.

Code 5

Access is denied.
Indicates that user has no access right to specified resource.

Code 9009

0x2331 · 2331 · 9,009

Program is not recognized as an internal or external command, operable program or batch file.
Indicates that command, application name or path has been misspelled when configuring the Actions—Run CMD Command or Start App.

Code 2147942545

-2147024751 · 0x80070091 · 80070091 · 2,147,942,545

The directory is not empty.
System attempted to delete a folder that was supposed to be empty but it isn’t. Extremely rarely, the Remove Folder Action may experience this error when deleting folders within a path of about 32,000 characters deep. In a few seconds/minutes Windows will enumerate files, and the problem will vanish upon retrying to remove the folder again.

Code 3221225477

-1073741819 · 0xC0000005 · C0000005 · 3,221,225,477

Access violation.
Indicates that the executed program has terminated abnormally or crashed.

Code 3221225495

-1073741801 · 0xC0000017 · C0000017 · 3,221,225,495

Not enough virtual memory is available.
Indicates that Windows has run out of memory. Observe Automation Workshop memory usage via the Operations Manager.

Code 3221225786

-1073741510 · 0xC000013A · C000013A · 3,221,225,786

The application terminated as a result of a CTRL+C.
Indicates that the application has been terminated either by user’s keyboard input CTRL+C, or CTRL+Break, or closing command prompt window.

Code 3221225794

-1073741502 · 0xC0000142 · C0000142 · 3,221,225,794

The application failed to initialize properly.
Usually for interactive apps a user with administrator rights is required. Moreover, the user must log on at least once to allow Windows to prepare the Windows Station and Desktop.

This error also may indicate that the application has been launched on a Desktop to which the current user has no access rights. Another less possible cause is that either gdi32.dll or user32.dll has failed to initialize.

Code 3221226505

-1073740791 · 0xC0000409 · C0000409 · 3,221,226,505

Stack buffer overflow / overrun.
Error can indicate a bug in the executed software that causes stack overflow, leading to abnormal termination of the software.

Code 3221225725

-1073741571 · 0xC00000FD · C00000FD · 3,221,225,725

Stack overflow / exhaustion.
Error can indicate a bug in the executed software that causes stack overflow, leading to abnormal termination of the software.

Code 3762507597

-532459699 · 0xE0434F4D · E0434F4D · 3,762,507,597

Unhandled exception in .NET application.
More details may be available in Windows Event log.

Code X

User-defined custom exit code.
Applications can return any predefined and custom codes, if they are programmed to do so. Additionally, Automation Workshop allows terminating apps directly from automated workflows providing any exit code. Valid value range: 0 through 4,294,967,295.

Help more?

For some error codes, Windows may provide a more friendly error message. NET HELPMSG displays information about Windows network messages (such as errors, warnings, and alerts). When you type NET HELPMSG and the error code (for example, net helpmsg 2182), Windows tells you more about the error code and may suggest actions to solve the issue.

net helpmsg 8

Not enough memory resources are available to process this command.

This will only work for Windows API Win32 error codes that originate from Microsoft Windows. If net help does not return a valid result, it can mean that the problem originates in external processes such as executed application or command syntax.

Great success!

More Run…

  • Start App · Overview · Variables & Events
  • Run CMD Command · Overview · Variables & Events
  • Remote FTP Command · Overview · Variables & Events
  • Remote SSH Command · Overview · Variables & Events
  • Execute Script · Overview · Variables & Events
  • Open Document · Overview · Variables & Events
  • Start Task · Overview · Variables & Events
  • Stop Task · Overview · Variables & Events

More ways to Run…

  • API · Run Task using API
  • Remote Manager · Remote Operations · Remote deployment · Run Remote Tasks
  • Interactive · Desktop Shortcut · Tray Icon · Command line
  • Advanced fallback · On Task Error · On Action Error
  • Post-execution events

Discover

Automation Workshop includes many more awesome Triggers and numerous Actions to aid you to automate any repetitive computer or business task by providing state-of-the-art GUI tools.

Automated trigger · FTP Watcher

FTP Watcher

Automate action · Send Email

Send Email

Automate now!

Just ask…

If you have any questions, please do not hesitate to contact our support team.

All error/exit codes

This repository provides a collection of error and exit codes for popular operating systems, programming languages and API‘s. Each collection is documented in Markdown files with a reference to their original source.

Want to contribute? Great! First, read this page.

Operating systems directories

  • Android
    • camera
    • playservices
    • playstore
    • SIP
  • MacOS
  • Linux
    • Sysexits
    • Stdlib
    • Bash

Programming languages directories

  • C
  • Java
  • JavaScript
    • Node.js
  • PHP
    • PHP
    • PHP-XML
  • Python

API directories

  • Amazon
    • S3
  • Facebook
  • Github
  • Twitter

And many more in progress… :)

Contribution

Want to contribute? Great! First, read this page.

Code reviews

All submissions, including submissions by project members, require review.
We use Github pull requests for this purpose.

Some tips for good pull requests:

  • Use our code
    When in doubt, try to stay true to the existing code of the project.
  • Write a descriptive commit message. What problem are you solving and what
    are the consequences? Where and what did you test? Some good tips:
    here
    and here.
  • If your PR consists of multiple commits which are successive improvements /
    fixes to your first commit, consider squashing them into a single commit
    (git rebase -i) such that your PR is a single commit on top of the current
    HEAD. This make reviewing the code so much easier, and our history more
    readable.

Formatting

This documentation is written using standard markdown syntax. Please submit your changes using the same syntax.

Licensing

MIT see LICENSE for the full license text.

To a first approximation, 0 is success, non-zero is failure, with 1 being general failure, and anything larger than one being a specific failure. Aside from the trivial exceptions of false and test, which are both designed to give 1 for success, there’s a few other exceptions I found.

More realistically, 0 means success or maybe failure, 1 means general failure or maybe success, 2 means general failure if 1 and 0 are both used for success, but maybe success as well.

The diff command gives 0 if files compared are identical, 1 if they differ, and 2 if binaries are different. 2 also means failure. The less command gives 1 for failure unless you fail to supply an argument, in which case, it exits 0 despite failing.

The more command and the spell command give 1 for failure, unless the failure is a result of permission denied, nonexistent file, or attempt to read a directory. In any of these cases, they exit 0 despite failing.

Then the expr command gives 1 for success unless the output is the empty string or zero, in which case, 0 is success. 2 and 3 are failure.

Then there’s cases where success or failure is ambiguous. When grep fails to find a pattern, it exits 1, but it exits 2 for a genuine failure (like permission denied). klist also exits 1 when it fails to find a ticket, although this isn’t really any more of a failure than when grep doesn’t find a pattern, or when you ls an empty directory.

So, unfortunately, the Unix powers that be don’t seem to enforce any logical set of rules, even on very commonly used executables.

You can use exit codes to integrate the VMware Tools configuration utility commands with a scripting tool.

The following table lists the common error codes defined in toolbox-cmd. Each subcommand may return other Windows or Linux error codes.

Table 1.
Exit Codes

Code Number Applicable Command Description
0 All commands The command was successful.
1 All commands A error occurred.

For the shrink command, 1 indicates that although shrinking is enabled, the shrink command cannot be carried out.

64 All commands The command-line argument is not valid (EX_USAGE).
69

upgrade

timesync

config

device

stat

shrink

For the device command, 69 indicates that the specified device does not exist. Use the list subcommand to display valid names of devices.

For the stat command, 69 indicates that the program could not communicate with the host (EX_UNAVAILABLE).

70

globalconf

gueststore

There is an internal software error (EX_SOFTWARE).
71 Not used There is a system error (EX_OSERR).
72

device

shrink

script

A critical OS file is missing (EX_OSFILE).
75

upgrade

stat

shrink

script

config

globalconf

logging

device

The host does not support the query, perhaps because the host is not an ESX/ESXi host (EX_TEMPFAIL).
77

script

disk

upgrade

globalconf

logging

info

config

Permission error occurred (EX_NOPERM).
130

Shrink

SIGNT received (VM_EX_INTERRUPT).

bash and Linux OS provides an error code on encountering failure or exist status code. As a numeric code is displayed it is for the user to understand and act on that error code. find the ready reference to the exit codes and error codes  with their meaning to help debug the issues faster.

BASH Exit Status

Exit Status Code

Description

0  

success

1

failure, as defined by the program

2

command line usage error

BASH Error Codes & their Meaning 

Error Code  Error  comment
1 catch all error code  errors such as divide by 0 or operations not permitted.
2 Misuse of shell builtins (according to Bash documentation) Missing Keyword, command or Permission
126 Command invoked cannot execute Missing execute permissions
127  Command not found command does not exit in the PATH or wrong command name
128 Invalid argument to exit valid range is from 0 to 255
‘128+n’ Fatal error signal “n” Process killed by -9 signal will return 128+9 131 as error code
130 Script terminated by Control-C Control C was pressed 
255 Exit status out of range  Status is not defined, not any of the known status 

Linux OS Error Numbers, Error Codes and Meaning 

Unix and Linux OS  shows  error code and error name at time time of failures  which may not be clear 

The table below provides a quick reference to error numbers, error name and their meaning to help in troubleshooting.

Error No. Error Name  Error description
1 EPERM  Operation not permitted 
2 ENOENT  No such file or directory 
3 ESRCH  No such process 
4 EINTR  Interrupted system call 
5 EIO I/O error 
6 ENXIO  No such device or address 
7 E2BIG  Arg list too long 
8 ENOEXEC  Exec format error 
9 EBADF  Bad file number 
10 ECHILD  No child processes 
11 EAGAIN  Try again 
12 ENOMEM  Out of memory 
13 EACCES  Permission denied 
14 EFAULT  Bad address 
15 ENOTBLK  Block device required 
16 EBUSY  Device or resource busy 
17 EEXIST  File exists 
18 EXDEV  Cross-device link 
19 ENODEV  No such device 
20 ENOTDIR  Not a directory 
21 EISDIR  Is a directory 
22 EINVAL  Invalid argument 
23 ENFILE  File table overflow 
24 EMFILE  Too many open files 
25 ENOTTY  Not a typewriter 
26 ETXTBSY  Text file busy 
27 EFBIG  File too large 
28 ENOSPC  No space left on device 
29 ESPIPE  Illegal seek 
30 EROFS  Read-only file system 
31 EMLINK  Too many links 
32 EPIPE  Broken pipe 
33 EDOM  Math argument out of domain of func 
34 ERANGE  Math result not representable 
35 EDEADLK  Resource deadlock would occur 
36 ENAMETOOLONG  File name too long 
37 ENOLCK  No record locks available 
38 ENOSYS  Function not implemented 
39 ENOTEMPTY  Directory not empty 
40 ELOOP  Too many symbolic links encountered 
41 EWOULDBLOCK  Operation would block 
42 ENOMSG  No message of desired type 
43 EIDRM  Identifier removed 
44 ECHRNG  Channel number out of range 
45 EL2NSYNC  Level 2 not synchronized 
46 EL3HLT  Level 3 halted 
47 EL3RST  Level 3 reset 
48 ELNRNG  Link number out of range 
49 EUNATCH  Protocol driver not attached 
50 ENOCSI  No CSI structure available 
51 EL2HLT  Level 2 halted 
52 EBADE  Invalid exchange 
53 EBADR  Invalid request descriptor 
54 EXFULL  Exchange full 
55 ENOANO  No anode 
56 EBADRQC  Invalid request code 
57 EBADSLT  Invalid slot 
58 EDEADLOCK  File locking deadlock error 
59 EBFONT  Bad font file format 
60 ENOSTR  Device not a stream 
61 ENODATA  No data available 
62 ETIME  Timer expired 
63 ENOSR  Out of streams resources 
64 ENONET  Machine is not on the network 
65 ENOPKG  Package not installed 
66 EREMOTE  Object is remote 
67 ENOLINK  Link has been severed 
68 EADV  Advertise error 
69 ESRMNT  Srmount error 
70 ECOMM  Communication error on send 
71 EPROTO  Protocol error 
72 EMULTIHOP  Multihop attempted 
73 EDOTDOT  RFS specific error 
74 EBADMSG  Not a data message 
75 EOVERFLOW  Value too large for defined data type 
76 ENOTUNIQ  Name not unique on network 
77 EBADFD  File descriptor in bad state 
78 EREMCHG  Remote address changed 
79 ELIBACC  Can not access a needed shared library 
80 ELIBBAD  Accessing a corrupted shared library 
81 ELIBSCN  .lib section in a.out corrupted 
82 ELIBMAX  Attempting to link in too many shared libraries 
83 ELIBEXEC  Cannot exec a shared library directly 
84 EILSEQ  Illegal byte sequence 
85 ERESTART  Interrupted system call should be restarted 
86 ESTRPIPE  Streams pipe error 
87 EUSERS  Too many users 
88 ENOTSOCK  Socket operation on non-socket 
89 EDESTADDRREQ  Destination address required 
90 EMSGSIZE  Message too long 
91 EPROTOTYPE  Protocol wrong type for socket 
92 ENOPROTOOPT  Protocol not available 
93 EPROTONOSUPPORT  Protocol not supported 
94 ESOCKTNOSUPPORT  Socket type not supported 
95 EOPNOTSUPP  Operation not supported on transport endpoint 
96 EPFNOSUPPORT  Protocol family not supported 
97 EAFNOSUPPORT  Address family not supported by protocol 
98 EADDRINUSE  Address already in use 
99 EADDRNOTAVAIL  Cannot assign requested address 
100 ENETDOWN  Network is down 
101 ENETUNREACH  Network is unreachable 
102 ENETRESET  Network dropped connection because of reset 
103 ECONNABORTED  Software caused connection abort 
104 ECONNRESET  Connection reset by peer 
105 ENOBUFS  No buffer space available 
106 EISCONN  Transport endpoint is already connected 
107 ENOTCONN  Transport endpoint is not connected 
108 ESHUTDOWN  Cannot send after transport endpoint shutdown 
109 ETOOMANYREFS  Too many references: cannot splice 
110 ETIMEDOUT  Connection timed out 
111 ECONNREFUSED  Connection refused 
112 EHOSTDOWN  Host is down 
113 EHOSTUNREACH  No route to host 
114 EALREADY  Operation already in progress 
115 EINPROGRESS  Operation now in progress 
116 ESTALE  Stale NFS file handle 
117 EUCLEAN  Structure needs cleaning 
118 ENOTNAM  Not a XENIX named type file 
119 ENAVAIL  No XENIX semaphores available 
120 EISNAM  Is a named type file 
121 EREMOTEIO Remote I/O error

In computer programming, a return code or an error code is a numeric or alphanumeric code that is used to determine the nature of an error and why it occurred.[1] They are also commonly found in consumer electronics and devices when they attempt to do something they cannot do (e.g., dividing by zero) or fail to do and they can be passed off to error handlers that determine what action to take.

In vehicles, error codes are five-digit codes that pinpoint a particular car fault. Car owners can make use of an on-board diagnostics scanner to identify a trouble code. The five-digit Diagnostic trouble code typically consists of one letter and four numbers (e.g. P0123).

In consumer productsEdit

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

Error codes can also be used to specify an error, to simplify research into the cause and how to fix it. This is commonly used in consumer products when something goes wrong, such as the cause of the 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 hexadecimal numbers, others use alphanumeric codes and some use a phrase describing the error.

In computingEdit

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 a popular operating system communicates error codes to the user.

In networking softwareEdit

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

  • List of HTTP status codes
  • List of FTP server return codes
  • Simple Mail Transfer Protocol#Protocol overview

In automobilesEdit

Error codes[2] in automobiles indicate to a driver or car mechanic what is wrong with a vehicle before repairs are initiated. A car is liable to display as many fault codes as possible on the OBD-II scanner, it all depends on the state of the engine system.

Error codes and exception handlingEdit

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.

See alsoEdit

  • errno.h, a header file in C that defines macros for reporting errors
  • Abort (computing)
  • Aspect-oriented programming
  • Failure
  • Exit status
  • Static code analysis

ReferencesEdit

  1. ^ «What is an Error Code?». www.computerhope.com. Retrieved 2020-01-22.
  2. ^ «Error Codes — Mechanic Geek». Retrieved 2022-08-27.

External linksEdit

  • Lists of Linux errno values, both numeric and symbolic
  • Microsoft system error codes
  • Microsoft Device Manager error codes

Понравилась статья? Поделить с друзьями:
  • Error codes cleaned перевод
  • Error codes bmw
  • Error codes best practices
  • Error codes 8 signature is invalid
  • Error codes 6101 your network is blocking a connection to parsec