2024-06-20 00:34:32 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
typedef enum lm_error {
|
2024-06-21 01:42:51 +00:00
|
|
|
LM_ERR_NoError = 0,
|
|
|
|
LM_ERR_URLBadChar = 1,
|
|
|
|
LM_ERR_URLBadProtocol = 2,
|
|
|
|
LM_ERR_URLTooLarge = 3,
|
|
|
|
LM_ERR_URLHostLarge = 4,
|
|
|
|
LM_ERR_URLPathLarge = 5,
|
|
|
|
LM_ERR_URLBadHost = 6,
|
|
|
|
LM_ERR_URLBadPath = 7,
|
|
|
|
LM_ERR_URLPortUnknown = 8,
|
|
|
|
LM_ERR_URLBadPort = 9,
|
|
|
|
LM_ERR_PoolNoSupport = 10,
|
|
|
|
LM_ERR_URLEnd = 11,
|
|
|
|
LM_ERR_MPTPBadVersion = 12,
|
|
|
|
LM_ERR_MPTPBadCode = 13,
|
|
|
|
LM_ERR_MPTPBadUrl = 14,
|
|
|
|
LM_ERR_MPTPHostFail = 15,
|
|
|
|
LM_ERR_MPTPSocketFail = 16,
|
|
|
|
LM_ERR_MPTPConnectFail = 17,
|
|
|
|
LM_ERR_MPTPRecvFail = 18,
|
|
|
|
LM_ERR_MPTPSendFail = 19,
|
2024-06-22 01:18:00 +00:00
|
|
|
LM_ERR_MPTPBadChunk = 29,
|
2024-06-21 01:42:51 +00:00
|
|
|
LM_ERR_MPTPSetsockopt = 30,
|
|
|
|
LM_ERR_MPTPTimeout = 31,
|
2024-06-22 01:18:00 +00:00
|
|
|
LM_ERR_MPTPBindFail = 32,
|
|
|
|
LM_ERR_ArgNULL = 33,
|
2024-06-20 00:34:32 +00:00
|
|
|
} lm_error_t;
|
|
|
|
|
|
|
|
typedef struct lm_error_desc {
|
|
|
|
lm_error_t code;
|
2024-06-20 22:36:56 +00:00
|
|
|
char *desc;
|
2024-06-20 00:34:32 +00:00
|
|
|
} lm_error_desc_t;
|
|
|
|
|
2024-06-20 22:36:56 +00:00
|
|
|
void lm_error_set(lm_error_t code);
|
2024-06-20 00:34:32 +00:00
|
|
|
lm_error_t lm_error();
|
2024-06-20 22:36:56 +00:00
|
|
|
char *lm_strerror();
|