fehQlibs 26
Qlibs
Loading...
Searching...
No Matches
error.h
Go to the documentation of this file.
1#ifndef ERROR_H
2#define ERROR_H
3
4#include <errno.h>
5
6#ifndef EPROTO /* OpenBSD compat */
7#define EPROTO EINTR
8#endif
9
10#define error_str(i) errstr(i)
11extern char *error_str(int);
12
13/* Exception handling notes:
14 (1) system errors RECEIVED according to <errno.h> during operation and handed over
15 (2) application errors DEFINED internally and ennumerated alongside with <errno.h>
16*/
17
18/* djb backwards compatibility - deprecated form of system errors */
19 /* Comparison of error codes and constants:
20 intern Linux FreeBSD OmniOS */
21#define error_intr EINTR /* -1 4 4 4 */
22#define error_nomem ENOMEM /* -2 12 12 12 */
23#define error_noent ENOENT /* -3 2 2 2 */
24#define error_txtbsy ETXTBSY /* -4 26 26 26 */
25#define error_io EIO /* -5 5 5 5 */
26#define error_exist EEXIST /* -6 17 17 17 */
27#define error_timeout ETIMEDOUT /* -7 110 60 145 */
28#define error_inprogress EINPROGRESS /* -8 115 36 160 */
29#define error_wouldblock EWOULDBLOCK /* -9 EAGAIN EAGAIN EAGAIN */
30#define error_again EAGAIN /* -10 11 35 11 */
31#define error_pipe EPIPE /* -11 32 32 32 */
32#define error_perm EPERM /* -12 1 1 1 */
33#define error_acces EACCES /* -13 13 13 13 */
34#define error_nodevice ENODEV /* -14 (6) (6) 19 */
35#define error_proto EPROTO /* -15 71 92 71 */
36#define error_isdir EISDIR /* -16 21 21 21 */
37#define error_connrefused ECONNREFUSED /* -17 111 61 146 */
38//extern int error_notdir; /* -18 20 20 20 */
39#define error_rofs EROFS /* -19 30 30 30 */
40#define error_connreset ECONNRESET /* -20 104 54 131 */
41
42/* djb uses some internal application error and class definitions -- revised (feh) */
43#define CAT -10 /* raw message w/o terminating \n */
44#define LOG -90 /* generic logging */
45#define INFO -91 /* named logging */
46#define TEMP -97 /* (triggered) temporay alert condition */
47#define ALERT -98 /* (triggered) alert condition */
48#define WARN -99 /* exception condition */
49#define ESOFT -100 /* soft error, reversed negative */
50#define EHARD -111 /* hard error, reversed negative */
51#define USAGE 100 /* usage error on call -- explicit usage() */
52#define SYNTAX 101 /* usage/syntax error on call -- explicit syntaxerror() */
53#define DROP 110 /* connection dropped -- explicit dropped() */
54#define FATAL 111 /* internal error -- all */
55#define ERROR 112 /* application error */
56
57#endif
#define error_str(i)
Definition: error.h:10