src/lib/errors.c
author Tero Marttila <terom@fixme.fi>
Thu, 28 May 2009 00:35:02 +0300
branchnew-lib-errors
changeset 218 5229a5d098b2
child 219 cefec18b8268
permissions -rw-r--r--
some of spbot and lib 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",
5229a5d098b2 some of spbot and lib compiles
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    12
    ERROR_TYPE_ERRNO(   ERR_SIGACTION,          "sigaction"                         )
5229a5d098b2 some of spbot and lib compiles
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    13
);
5229a5d098b2 some of spbot and lib compiles
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    14
5229a5d098b2 some of spbot and lib compiles
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    15
const struct error_list libevent_errors = ERROR_LIST("libevent",
5229a5d098b2 some of spbot and lib compiles
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    16
    ERROR_TYPE(         ERR_EVENT_NEW,          "event_new"                         ),
5229a5d098b2 some of spbot and lib compiles
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    17
    ERROR_TYPE(         ERR_EVENT_ADD,          "event_add"                         ),
5229a5d098b2 some of spbot and lib compiles
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    18
    ERROR_TYPE(         ERR_EVENT_DEL,          "event_del"                         )
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