ALib C++ Library
Library Version: 2510 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
systemerrors.inl
Go to the documentation of this file.
1//==================================================================================================
2/// \file
3/// This header-file is part of module \alib_system of the \aliblong.
4///
5/// \emoji :copyright: 2013-2025 A-Worx GmbH, Germany.
6/// Published under \ref mainpage_license "Boost Software License".
7//==================================================================================================
8ALIB_EXPORT namespace alib { namespace system {
9
10//==================================================================================================
11/// Denotes result values returned by system functions (glibc, etc).
12/// In case module \alib_camp is included in the \alibbuild, the enum record
13/// \alib{exceptions;ERException} is assigned and each error is resourced in the
14/// \alib{camp;Basecamp}.
15/// With that, these enums can be used as information entries in class \alib{exceptions;Exception}.
16//==================================================================================================
17enum class SystemErrors
18{
19 UNKNOWN = -1 , ///< Unknown Error
20 OK = 0 , ///< No Error
21 None = 0 , ///< No Error (alias for OK)
22
23 #if defined (__GLIBC__) || defined(__APPLE__) || defined(__ANDROID_NDK__)
24
25 eperm = EPERM , ///< 1 "Operation not permitted"
26 enoent = ENOENT , ///< 2 "No such file or directory"
27 esrch = ESRCH , ///< 3 "No such process"
28 eintr = EINTR , ///< 4 "Interrupted system call"
29 eio = EIO , ///< 5 "I/O error"
30 enxio = ENXIO , ///< 6 "No such device or address"
31 e2Big = E2BIG , ///< 7 "Argument list too long"
32 enoexec = ENOEXEC , ///< 8 "Exec format error"
33 ebadf = EBADF , ///< 9 "Bad file number"
34 echild = ECHILD , ///< 10 "No child processes"
35 eagain = EAGAIN , ///< 11 "Try again. (E.g operation would block)"
36 enomem = ENOMEM , ///< 12 "Out of memory"
37 eacces = EACCES , ///< 13 "Permission denied"
38 efault = EFAULT , ///< 14 "Bad address"
39 enotblk = ENOTBLK , ///< 15 "Block device required"
40 ebusy = EBUSY , ///< 16 "Device or resource busy"
41 eexist = EEXIST , ///< 17 "File exists"
42 exdev = EXDEV , ///< 18 "Cross-device link"
43 enodev = ENODEV , ///< 19 "No such device"
44 enotdir = ENOTDIR , ///< 20 "Not a directory"
45 eisdir = EISDIR , ///< 21 "Is a directory"
46 einval = EINVAL , ///< 22 "Invalid argument"
47 enfile = ENFILE , ///< 23 "File table overflow"
48 emfile = EMFILE , ///< 24 "Too many open files"
49 enotty = ENOTTY , ///< 25 "Not a typewriter"
50 etxtbsy = ETXTBSY , ///< 26 "Text file busy"
51 efbig = EFBIG , ///< 27 "File too large"
52 enospc = ENOSPC , ///< 28 "No space left on device"
53 espipe = ESPIPE , ///< 29 "Illegal seek"
54 erofs = EROFS , ///< 30 "Read-only file system"
55 emlink = EMLINK , ///< 31 "Too many links"
56 epipe = EPIPE , ///< 32 "Broken pipe"
57 edom = EDOM , ///< 33 "Math argument out of domain of func"
58 erange = ERANGE , ///< 34 "Math result not representable"
59 edeadlk = EDEADLK , ///< 35 "Resource deadlock would occur"
60 enametoolong = ENAMETOOLONG , ///< 36 "File name too long"
61 enolck = ENOLCK , ///< 37 "No record locks available"
62 enosys = ENOSYS , ///< 38 "Invalid system call number"
63 enotempty = ENOTEMPTY , ///< 39 "Directory not empty"
64 eloop = ELOOP , ///< 40 "Too many symbolic links encountered"
65 enomsg = ENOMSG , ///< 42 "No message of desired type"
66 eidrm = EIDRM , ///< 43 "Identifier removed"
67#if !defined(__APPLE__)
68 echrng = ECHRNG , ///< 44 "Channel number out of range"
69 el2Nsync = EL2NSYNC , ///< 45 "Level 2 not synchronized"
70 el3Hlt = EL3HLT , ///< 46 "Level 3 halted"
71 el3Rst = EL3RST , ///< 47 "Level 3 reset"
72 elnrng = ELNRNG , ///< 48 "Link number out of range"
73 eunatch = EUNATCH , ///< 49 "Protocol driver not attached"
74
75 enocsi = ENOCSI , ///< 50 "No CSI structure available"
76 el2Hlt = EL2HLT , ///< 51 "Level 2 halted"
77 ebade = EBADE , ///< 52 "Invalid exchange"
78 ebadr = EBADR , ///< 53 "Invalid request descriptor"
79 exfull = EXFULL , ///< 54 "Exchange full"
80 enoano = ENOANO , ///< 55 "No anode"
81 ebadrqc = EBADRQC , ///< 56 "Invalid request code"
82 ebadslt = EBADSLT , ///< 57 "Invalid slot"
83 ebfont = EBFONT , ///< 59 "Bad font file format"
84#endif
85 enostr = ENOSTR , ///< 60 "Device not a stream"
86 enodata = ENODATA , ///< 61 "No data available"
87 etime = ETIME , ///< 62 "Timer expired"
88 enosr = ENOSR , ///< 63 "Out of streams resources"
89#if !defined(__APPLE__)
90 enonet = ENONET , ///< 64 "Machine is not on the network"
91 enopkg = ENOPKG , ///< 65 "Package not installed"
92#endif
93 eremote = EREMOTE , ///< 66 "Object is remote"
94 enolink = ENOLINK , ///< 67 "Link has been severed"
95#if !defined(__APPLE__)
96 eadv = EADV , ///< 68 "Advertise error"
97 esrmnt = ESRMNT , ///< 69 "Srmount error"
98 ecomm = ECOMM , ///< 70 "Communication error on send"
99#endif
100 eproto = EPROTO , ///< 71 "Protocol error"
101 emultihop = EMULTIHOP , ///< 72 "Multihop attempted"
102#if !defined(__APPLE__)
103 edotdot = EDOTDOT , ///< 73 "RFS specific error"
104#endif
105 ebadmsg = EBADMSG , ///< 74 "Not a data message"
106 eoverflow = EOVERFLOW , ///< 75 "Value too large for defined data type"
107#if !defined(__APPLE__)
108 enotuniq = ENOTUNIQ , ///< 76 "Name not unique on network"
109 ebadfd = EBADFD , ///< 77 "File descriptor in bad state"
110 eremchg = EREMCHG , ///< 78 "Remote address changed"
111 elibacc = ELIBACC , ///< 79 "Cannot access a needed shared library"
112 elibbad = ELIBBAD , ///< 80 "Accessing a corrupted shared library"
113 elibscn = ELIBSCN , ///< 81 ".lib section in a.out corrupted"
114 elibmax = ELIBMAX , ///< 82 "Attempting to link in too many shared libraries"
115 elibexec = ELIBEXEC , ///< 83 "Cannot exec a shared library directly"
116#endif
117 eilseq = EILSEQ , ///< 84 "Illegal byte sequence"
118#if !defined(__APPLE__)
119 erestart = ERESTART , ///< 85 "Interrupted system call should be restarted"
120 estrpipe = ESTRPIPE , ///< 86 "Streams pipe error"
121#endif
122 eusers = EUSERS , ///< 87 "Too many users"
123 enotsock = ENOTSOCK , ///< 88 "Socket operation on non-socket"
124 edestaddrreq = EDESTADDRREQ , ///< 89 "Destination address required"
125 emsgsize = EMSGSIZE , ///< 90 "Message too long"
126 eprototype = EPROTOTYPE , ///< 91 "Protocol wrong type for socket"
127 enoprotoopt = ENOPROTOOPT , ///< 92 "Protocol not available"
128 eprotonosupport = EPROTONOSUPPORT , ///< 93 "Protocol not supported"
129 esocktnosupport = ESOCKTNOSUPPORT , ///< 94 "Socket type not supported"
130 eopnotsupp = EOPNOTSUPP , ///< 95 "Operation not supported on transport endpoint"
131 epfnosupport = EPFNOSUPPORT , ///< 96 "Protocol family not supported"
132 eafnosupport = EAFNOSUPPORT , ///< 97 "Address family not supported by protocol"
133 eaddrinuse = EADDRINUSE , ///< 98 "Address already in use"
134 eaddrnotavail = EADDRNOTAVAIL , ///< 99 "Cannot assign requested address"
135 enetdown = ENETDOWN , ///< 100 "Network is down"
136 enetunreach = ENETUNREACH , ///< 101 "Network is unreachable"
137 enetreset = ENETRESET , ///< 102 "Network dropped connection because of reset"
138 econnaborted = ECONNABORTED , ///< 103 "Software caused connection abort"
139 econnreset = ECONNRESET , ///< 104 "Connection reset by peer"
140 enobufs = ENOBUFS , ///< 105 "No buffer space available"
141 eisconn = EISCONN , ///< 106 "Transport endpoint is already connected"
142 enotconn = ENOTCONN , ///< 107 "Transport endpoint is not connected"
143 eshutdown = ESHUTDOWN , ///< 108 "Cannot send after transport endpoint shutdown"
144 etoomanyrefs = ETOOMANYREFS , ///< 109 "Too many references: cannot splice"
145 etimedout = ETIMEDOUT , ///< 110 "Connection timed out"
146 econnrefused = ECONNREFUSED , ///< 111 "Connection refused"
147 ehostdown = EHOSTDOWN , ///< 112 "Host is down"
148 ehostunreach = EHOSTUNREACH , ///< 113 "No route to host"
149 ealready = EALREADY , ///< 114 "Operation already in progress"
150 einprogress = EINPROGRESS , ///< 115 "Operation now in progress"
151 estale = ESTALE , ///< 116 "Stale file handle"
152#if !defined(__APPLE__)
153 euclean = EUCLEAN , ///< 117 "Structure needs cleaning"
154 enotnam = ENOTNAM , ///< 118 "Not a XENIX named type file"
155 enavail = ENAVAIL , ///< 119 "No XENIX semaphores available"
156 eisnam = EISNAM , ///< 120 "Is a named type file"
157 eremoteio = EREMOTEIO , ///< 121 "Remote I/O error"
158#endif
159 edquot = EDQUOT , ///< 122 "Quota exceeded"
160#if !defined(__APPLE__)
161 enomedium = ENOMEDIUM , ///< 123 "No medium found"
162 emediumtype = EMEDIUMTYPE , ///< 124 "Wrong medium type"
163#endif
164 ecanceled = ECANCELED , ///< 125 "Operation Canceled"
165#if !defined(__APPLE__)
166 enokey = ENOKEY , ///< 126 "Required key not available"
167 ekeyexpired = EKEYEXPIRED , ///< 127 "Key has expired"
168 ekeyrevoked = EKEYREVOKED , ///< 128 "Key has been revoked"
169 ekeyrejected = EKEYREJECTED , ///< 129 "Key was rejected by service"
170#endif
171 eownerdead = EOWNERDEAD , ///< 130 "Owner died"
172 enotrecoverable = ENOTRECOVERABLE , ///< 131 "State not recoverable"
173#if !defined(__APPLE__)
174 erfkill = ERFKILL , ///< 132 "Operation not possible due to RF-kill"
175 ehwpoison = EHWPOISON , ///< 133 "Memory page has hardware error"
176#endif
177
178 #elif defined(_WIN32)
179 eperm = EPERM , ///< 1
180 enoent = ENOENT , ///< 2
181 esrch = ESRCH , ///< 3
182 eintr = EINTR , ///< 4
183 eio = EIO , ///< 5
184 enxio = ENXIO , ///< 6
185 e2Big = E2BIG , ///< 7
186 enoexec = ENOEXEC , ///< 8
187 ebadf = EBADF , ///< 9
188 echild = ECHILD , ///< 10
189 eagain = EAGAIN , ///< 11
190 enomem = ENOMEM , ///< 12
191 eacces = EACCES , ///< 13
192 efault = EFAULT , ///< 14
193 ebusy = EBUSY , ///< 16
194 eexist = EEXIST , ///< 17
195 exdev = EXDEV , ///< 18
196 enodev = ENODEV , ///< 19
197 enotdir = ENOTDIR , ///< 20
198 eisdir = EISDIR , ///< 21
199 enfile = ENFILE , ///< 23
200 emfile = EMFILE , ///< 24
201 enotty = ENOTTY , ///< 25
202 efbig = EFBIG , ///< 27
203 enospc = ENOSPC , ///< 28
204 espipe = ESPIPE , ///< 29
205 erofs = EROFS , ///< 30
206 emlink = EMLINK , ///< 31
207 epipe = EPIPE , ///< 32
208 edom = EDOM , ///< 33
209 edeadlk = EDEADLK , ///< 36
210 enametoolong = ENAMETOOLONG , ///< 38
211 enolck = ENOLCK , ///< 39
212 enosys = ENOSYS , ///< 40
213 enotempty = ENOTEMPTY , ///< 41
214 einval = EINVAL , ///< 22
215 erange = ERANGE , ///< 34
216 eilseq = EILSEQ , ///< 42
217 struncate = STRUNCATE , ///< 80
218 eaddrinuse = EADDRINUSE , ///< 100
219 eaddrnotavail = EADDRNOTAVAIL , ///< 101
220 eafnosupport = EAFNOSUPPORT , ///< 102
221 ealready = EALREADY , ///< 103
222 ebadmsg = EBADMSG , ///< 104
223 ecanceled = ECANCELED , ///< 105
224 econnaborted = ECONNABORTED , ///< 106
225 econnrefused = ECONNREFUSED , ///< 107
226 econnreset = ECONNRESET , ///< 108
227 edestaddrreq = EDESTADDRREQ , ///< 109
228 ehostunreach = EHOSTUNREACH , ///< 110
229 eidrm = EIDRM , ///< 111
230 einprogress = EINPROGRESS , ///< 112
231 eisconn = EISCONN , ///< 113
232 eloop = ELOOP , ///< 114
233 emsgsize = EMSGSIZE , ///< 115
234 enetdown = ENETDOWN , ///< 116
235 enetreset = ENETRESET , ///< 117
236 enetunreach = ENETUNREACH , ///< 118
237 enobufs = ENOBUFS , ///< 119
238 enodata = ENODATA , ///< 120
239 enolink = ENOLINK , ///< 121
240 enomsg = ENOMSG , ///< 122
241 enoprotoopt = ENOPROTOOPT , ///< 123
242 enosr = ENOSR , ///< 124
243 enostr = ENOSTR , ///< 125
244 enotconn = ENOTCONN , ///< 126
245 enotrecoverable = ENOTRECOVERABLE , ///< 127
246 enotsock = ENOTSOCK , ///< 128
247 enotsup = ENOTSUP , ///< 129
248 eopnotsupp = EOPNOTSUPP , ///< 130
249
250 #if !defined(_WIN32)
251 eother = EOTHER , ///< 131
252 #else
253 eother = 131 , ///< 131
254 #endif
255 eoverflow = EOVERFLOW , ///< 132
256 eownerdead = EOWNERDEAD , ///< 133
257 eproto = EPROTO , ///< 134
258 eprotonosupport = EPROTONOSUPPORT , ///< 135
259 eprototype = EPROTOTYPE , ///< 136
260 etime = ETIME , ///< 137
261 etimedout = ETIMEDOUT , ///< 138
262 etxtbsy = ETXTBSY , ///< 139
263 ewouldblock = EWOULDBLOCK , ///< 140
264 #endif
265};
266
267} // namespace alib[::system]
268
269/// Type alias in namespace \b alib.
271
272} // namespace [alib]
273
274
276#if ALIB_ENUMRECORDS && ALIB_EXCEPTIONS
278#endif
279
#define ALIB_ENUMS_ASSIGN_RECORD(TEnum, TRecord)
#define ALIB_BOXING_VTABLE_DECLARE(TMapped, Identifier)
#define ALIB_EXPORT
Definition alib.inl:488
@ None
No Error (alias for OK)
system::SystemErrors SystemErrors
Type alias in namespace alib.