Skip to content

Commit 6b8a920

Browse files
Added standard values for error codes from errno
1 parent a9cc59b commit 6b8a920

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed

api/ErrorCodes.h

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,85 @@ typedef int_fast32_t error_t;
88
enum : error_t {
99
ArduinoSuccess = 0,
1010
ArduinoError = 1,
11+
12+
// TODO better names
13+
ArduinoEPERM = -1, /**< Not owner */
14+
ArduinoENOENT = -2, /**< No such file or directory */
15+
ArduinoESRCH = -3, /**< No such context */
16+
ArduinoEINTR = -4, /**< Interrupted system call */
17+
ArduinoEIO = -5, /**< I/O error */
18+
ArduinoENXIO = -6, /**< No such device or address */
19+
ArduinoE2BIG = -7, /**< Arg list too long */
20+
ArduinoENOEXEC = -8, /**< Exec format error */
21+
ArduinoEBADF = -9, /**< Bad file number */
22+
ArduinoECHILD = -10, /**< No children */
23+
ArduinoEAGAIN = -11, /**< No more contexts */
24+
ArduinoENOMEM = -12, /**< Not enough core */
25+
ArduinoEACCES = -13, /**< Permission denied */
26+
ArduinoEFAULT = -14, /**< Bad address */
27+
ArduinoENOTBLK = -15, /**< Block device required */
28+
ArduinoEBUSY = -16, /**< Mount device busy */
29+
ArduinoEEXIST = -17, /**< File exists */
30+
ArduinoEXDEV = -18, /**< Cross-device link */
31+
ArduinoENODEV = -19, /**< No such device */
32+
ArduinoENOTDIR = -20, /**< Not a directory */
33+
ArduinoEISDIR = -21, /**< Is a directory */
34+
ArduinoEINVAL = -22, /**< Invalid argument */
35+
ArduinoENFILE = -23, /**< File table overflow */
36+
ArduinoEMFILE = -24, /**< Too many open files */
37+
ArduinoENOTTY = -25, /**< Not a typewriter */
38+
ArduinoETXTBSY = -26, /**< Text file busy */
39+
ArduinoEFBIG = -27, /**< File too large */
40+
ArduinoENOSPC = -28, /**< No space left on device */
41+
ArduinoESPIPE = -29, /**< Illegal seek */
42+
ArduinoEROFS = -30, /**< Read-only file system */
43+
ArduinoEMLINK = -31, /**< Too many links */
44+
ArduinoEPIPE = -32, /**< Broken pipe */
45+
ArduinoENOMSG = -35, /**< Unexpected message type */
46+
ArduinoEDEADLK = -45, /**< Resource deadlock avoided */
47+
ArduinoENOLCK = -46, /**< No locks available */
48+
ArduinoENOSTR = -60, /**< STREAMS device required */
49+
ArduinoENODATA = -61, /**< Missing expected message data */
50+
ArduinoETIME = -62, /**< STREAMS timeout occurred */
51+
ArduinoENOSR = -63, /**< Insufficient memory */
52+
ArduinoEPROTO = -71, /**< Generic STREAMS error */
53+
ArduinoEBADMSG = -77, /**< Invalid STREAMS message */
54+
ArduinoENOSYS = -88, /**< Function not implemented */
55+
ArduinoENOTEMPTY = -90, /**< Directory not empty */
56+
ArduinoENAMETOOLONG = -91, /**< File name too long */
57+
ArduinoELOOP = -92, /**< Too many levels of symbolic links */
58+
ArduinoEOPNOTSUPP = -95, /**< Operation not supported on socket */
59+
ArduinoEPFNOSUPPORT = -96, /**< Protocol family not supported */
60+
ArduinoECONNRESET = -104, /**< Connection reset by peer */
61+
ArduinoENOBUFS = -105, /**< No buffer space available */
62+
ArduinoEAFNOSUPPORT = -106, /**< Addr family not supported */
63+
ArduinoEPROTOTYPE = -107, /**< Protocol wrong type for socket */
64+
ArduinoENOTSOCK = -108, /**< Socket operation on non-socket */
65+
ArduinoENOPROTOOPT = -109, /**< Protocol not available */
66+
ArduinoESHUTDOWN = -110, /**< Can't send after socket shutdown */
67+
ArduinoECONNREFUSED = -111, /**< Connection refused */
68+
ArduinoEADDRINUSE = -112, /**< Address already in use */
69+
ArduinoECONNABORTED = -113, /**< Software caused connection abort */
70+
ArduinoENETUNREACH = -114, /**< Network is unreachable */
71+
ArduinoENETDOWN = -115, /**< Network is down */
72+
ArduinoETIMEDOUT = -116, /**< Connection timed out */
73+
ArduinoEHOSTDOWN = -117, /**< Host is down */
74+
ArduinoEHOSTUNREACH = -118, /**< No route to host */
75+
ArduinoEINPROGRESS = -119, /**< Operation now in progress */
76+
ArduinoEALREADY = -120, /**< Operation already in progress */
77+
ArduinoEDESTADDRREQ = -121, /**< Destination address required */
78+
ArduinoEMSGSIZE = -122, /**< Message size */
79+
ArduinoEPROTONOSUPPORT = -123, /**< Protocol not supported */
80+
ArduinoESOCKTNOSUPPORT = -124, /**< Socket type not supported */
81+
ArduinoEADDRNOTAVAIL = -125, /**< Can't assign requested address */
82+
ArduinoENETRESET = -126, /**< Network dropped connection on reset */
83+
ArduinoEISCONN = -127, /**< Socket is already connected */
84+
ArduinoENOTCONN = -128, /**< Socket is not connected */
85+
ArduinoETOOMANYREFS = -129, /**< Too many references: can't splice */
86+
ArduinoENOTSUP = -134, /**< Unsupported value */
87+
ArduinoEOVERFLOW = -139, /**< Value overflow */
88+
ArduinoECANCELED = -140, /**< Operation canceled */
89+
ArduinoEWOULDBLOCK = ArduinoEAGAIN, /**< Operation would block */
1190
};
1291

1392
/* Error Codes:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy