author | Tero Marttila <terom@fixme.fi> |
Thu, 28 May 2009 01:17:36 +0300 | |
branch | new-lib-errors |
changeset 219 | cefec18b8268 |
parent 218 | 5229a5d098b2 |
permissions | -rw-r--r-- |
218 | 1 |
#include "errors.h" |
2 |
||
3 |
const struct error_list general_errors = ERROR_LIST("general", |
|
4 |
ERROR_TYPE( ERR_MEM, "memory allocation error" ), |
|
5 |
ERROR_TYPE_STRING( ERR_NOT_IMPLEMENTED, "function not implmented" ), |
|
6 |
ERROR_TYPE_STRING( ERR_MISC, "miscellaneous error" ), |
|
7 |
ERROR_TYPE_STRING( ERR_CMD_OPT, "invalid command line option" ), |
|
8 |
ERROR_TYPE( ERR_UNKNOWN, "unknown error" ) |
|
9 |
); |
|
10 |
||
11 |
const struct error_list libc_errors = ERROR_LIST("libc", |
|
219
cefec18b8268
some of the lib/transport stuff compiles
Tero Marttila <terom@fixme.fi>
parents:
218
diff
changeset
|
12 |
ERROR_TYPE_ERRNO( ERR_SIGACTION, "sigaction" ), |
cefec18b8268
some of the lib/transport stuff compiles
Tero Marttila <terom@fixme.fi>
parents:
218
diff
changeset
|
13 |
ERROR_TYPE_ERRNO( ERR_READ, "read" ), |
cefec18b8268
some of the lib/transport stuff compiles
Tero Marttila <terom@fixme.fi>
parents:
218
diff
changeset
|
14 |
ERROR_TYPE_ERRNO( ERR_WRITE, "write" ), |
cefec18b8268
some of the lib/transport stuff compiles
Tero Marttila <terom@fixme.fi>
parents:
218
diff
changeset
|
15 |
ERROR_TYPE_ERRNO( ERR_WRITE_EOF, "write: EOF" ), |
cefec18b8268
some of the lib/transport stuff compiles
Tero Marttila <terom@fixme.fi>
parents:
218
diff
changeset
|
16 |
ERROR_TYPE_ERRNO( ERR_FCNTL, "fcntl" ), |
cefec18b8268
some of the lib/transport stuff compiles
Tero Marttila <terom@fixme.fi>
parents:
218
diff
changeset
|
17 |
ERROR_TYPE_ERRNO( ERR_CLOSE, "close" ) |
218 | 18 |
); |
19 |
||
20 |
const struct error_list libevent_errors = ERROR_LIST("libevent", |
|
21 |
ERROR_TYPE( ERR_EVENT_NEW, "event_new" ), |
|
22 |
ERROR_TYPE( ERR_EVENT_ADD, "event_add" ), |
|
23 |
ERROR_TYPE( ERR_EVENT_DEL, "event_del" ) |
|
24 |
); |
|
25 |
||
219
cefec18b8268
some of the lib/transport stuff compiles
Tero Marttila <terom@fixme.fi>
parents:
218
diff
changeset
|
26 |
const struct error_list lua_errors = ERROR_LIST("lua", |
cefec18b8268
some of the lib/transport stuff compiles
Tero Marttila <terom@fixme.fi>
parents:
218
diff
changeset
|
27 |
ERROR_TYPE_STRING( ERR_LUA_MEM, "memory error" ), |
cefec18b8268
some of the lib/transport stuff compiles
Tero Marttila <terom@fixme.fi>
parents:
218
diff
changeset
|
28 |
ERROR_TYPE_STRING( ERR_LUA_SYNTAX, "syntax error" ), |
cefec18b8268
some of the lib/transport stuff compiles
Tero Marttila <terom@fixme.fi>
parents:
218
diff
changeset
|
29 |
ERROR_TYPE_STRING( ERR_LUA_RUN, "runtime erorr" ), |
cefec18b8268
some of the lib/transport stuff compiles
Tero Marttila <terom@fixme.fi>
parents:
218
diff
changeset
|
30 |
ERROR_TYPE_STRING( ERR_LUA_ERR, "error-handling error" ), |
cefec18b8268
some of the lib/transport stuff compiles
Tero Marttila <terom@fixme.fi>
parents:
218
diff
changeset
|
31 |
ERROR_TYPE_STRING( ERR_LUA_FILE, "filesystem error" ) |
cefec18b8268
some of the lib/transport stuff compiles
Tero Marttila <terom@fixme.fi>
parents:
218
diff
changeset
|
32 |
); |