src/lib/errors.c
author Tero Marttila <terom@fixme.fi>
Thu, 28 May 2009 01:17:36 +0300
branchnew-lib-errors
changeset 219 cefec18b8268
parent 218 5229a5d098b2
permissions -rw-r--r--
some of the lib/transport stuff compiles
218
5229a5d098b2 some of spbot and lib compiles
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     1
#include "errors.h"
5229a5d098b2 some of spbot and lib compiles
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     2
5229a5d098b2 some of spbot and lib compiles
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     3
const struct error_list general_errors = ERROR_LIST("general",
5229a5d098b2 some of spbot and lib compiles
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     4
    ERROR_TYPE(         ERR_MEM,                "memory allocation error"           ),
5229a5d098b2 some of spbot and lib compiles
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     5
    ERROR_TYPE_STRING(  ERR_NOT_IMPLEMENTED,    "function not implmented"           ),
5229a5d098b2 some of spbot and lib compiles
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     6
    ERROR_TYPE_STRING(  ERR_MISC,               "miscellaneous error"               ),
5229a5d098b2 some of spbot and lib compiles
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     7
    ERROR_TYPE_STRING(  ERR_CMD_OPT,            "invalid command line option"       ),
5229a5d098b2 some of spbot and lib compiles
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     8
    ERROR_TYPE(         ERR_UNKNOWN,            "unknown error"                     )
5229a5d098b2 some of spbot and lib compiles
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     9
);
5229a5d098b2 some of spbot and lib compiles
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    10
5229a5d098b2 some of spbot and lib compiles
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    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
5229a5d098b2 some of spbot and lib compiles
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    18
);
5229a5d098b2 some of spbot and lib compiles
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    19
5229a5d098b2 some of spbot and lib compiles
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    20
const struct error_list libevent_errors = ERROR_LIST("libevent",
5229a5d098b2 some of spbot and lib compiles
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    21
    ERROR_TYPE(         ERR_EVENT_NEW,          "event_new"                         ),
5229a5d098b2 some of spbot and lib compiles
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    22
    ERROR_TYPE(         ERR_EVENT_ADD,          "event_add"                         ),
5229a5d098b2 some of spbot and lib compiles
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    23
    ERROR_TYPE(         ERR_EVENT_DEL,          "event_del"                         )
5229a5d098b2 some of spbot and lib compiles
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    24
);
5229a5d098b2 some of spbot and lib compiles
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    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
);