#ifndef ERROR_H #define ERROR_H // TODO: Most of these aren't even errors used in this library. // I should trim this down to only the ones belonging to the library, and make // new enums for the client and server. Perhaps I can leverage __ERR_COUNT to // have the client/server-specific enums start where this one ends enum error_t { ERR_OK, ERR_INPUT, ERR_ALLOC, ERR_NOTFOUND, ERR_FORK, ERR_SETSID, ERR_SOCKET, ERR_JSON_SERIALISE, ERR_JSON_DESERIALISE, ERR_INVALID_REQUEST, ERR_REQUEST_FAILED, ERR_THREAD, ERR_MUTEX, __ERR_COUNT, }; extern char const *const ERROR_STRS[]; #endif