6#define IRC_ERROR_CODE_TUPLE_LIST \
7 IRC_ERROR_CODE_X(IRC_SUCCESS , 0, "Success") \
8 IRC_ERROR_CODE_X(IRC_FAILED_UNREACHABLE_CODE, 5, "Failed to reach the unreachable code") \
9 IRC_ERROR_CODE_X(IRC_SHUTDOWN , 6, "Shutdown") \
13 IRC_ERROR_CODE_X(IRC_INVALID_PORT , 100, "Invalid port number") \
14 IRC_ERROR_CODE_X(IRC_PASSWORD_TOO_SHORT, 101, "Password is too short") \
15 IRC_ERROR_CODE_X(IRC_PASSWORD_TOO_LONG , 102, "Password is too long") \
16 IRC_ERROR_CODE_X(IRC_INVALID_PASSWORD , 103, "Invalid password") \
21 IRC_ERROR_CODE_X(IRC_FAILED_TO_CREATE_SOCKET , 200, "Failed to create socket") \
22 IRC_ERROR_CODE_X(IRC_FAILED_TO_BIND_SOCKET , 201, "Failed to bind socket") \
23 IRC_ERROR_CODE_X(IRC_FAILED_TO_LISTEN_SOCKET , 202, "Failed to listen on socket") \
24 IRC_ERROR_CODE_X(IRC_FAILED_TO_ACCEPT_SOCKET , 203, "Failed to accept on socket") \
25 IRC_ERROR_CODE_X(IRC_FAILED_TO_CONNECT_SOCKET , 204, "Failed to connect on socket") \
26 IRC_ERROR_CODE_X(IRC_FAILED_TO_SEND_SOCKET , 205, "Failed to send on socket") \
27 IRC_ERROR_CODE_X(IRC_FAILED_TO_RECV_SOCKET , 206, "Failed to recv on socket") \
28 IRC_ERROR_CODE_X(IRC_FAILED_TO_CLOSE_SOCKET , 207, "Failed to close on socket") \
29 IRC_ERROR_CODE_X(IRC_FAILED_TO_SHUTDOWN_SOCKET , 208, "Failed to shutdown on socket") \
30 IRC_ERROR_CODE_X(IRC_FAILED_TO_SETSOCKOPT_SOCKET, 209, "Failed to setsockopt on socket") \
31 IRC_ERROR_CODE_X(IRC_ERROR_LISTEN_SOCKET , 210, "Listen socket error in eventLoop") \
36 IRC_ERROR_CODE_X(IRC_FAILED_TO_CREATE_KQUEUE , 300, "Failed to create kqueue") \
37 IRC_ERROR_CODE_X(IRC_FAILED_TO_ADD_KEVENT , 301, "Failed to add kqueue") \
38 IRC_ERROR_CODE_X(IRC_FAILED_TO_DEL_KEVENT , 302, "Failed to del kqueue") \
39 IRC_ERROR_CODE_X(IRC_FAILED_TO_WAIT_KEVENT , 303, "Failed to wait kevent") \
40 IRC_ERROR_CODE_X(IRC_FAILED_TO_OBSERVE_KEVENT , 304, "Failed to observe kevent") \
41 IRC_ERROR_CODE_X(IRC_ERROR_LISTEN_SOCKET_EVENT, 305, "Listen socket event error") \
42 IRC_ERROR_CODE_X(IRC_ERROR_CLIENT_SOCKET_EVENT, 306, "Client socket event error") \
50#define IRC_ERROR_CODE_X(code, number, message) code = number,
53#undef IRC_ERROR_CODE_X
65#define IRC_ERROR_CODE_X(code, number, message) \
69#undef IRC_ERROR_CODE_X
71 return "Unknown error";
#define IRC_ERROR_CODE_TUPLE_LIST
Tuple of error code, error number, and error message.
Definition IrcErrorCode.hpp:6
Definition ChannelControlBlock.hpp:12
const char * GetIrcErrorMessage(const EIrcErrorCode errorCode)
Get the error message from the error code.
Definition IrcErrorCode.hpp:61
EIrcErrorCode
Error Codes Enum.
Definition IrcErrorCode.hpp:49
@ IRC_ERROR_CODE_MAX
Definition IrcErrorCode.hpp:52