2024-06-20 00:34:32 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
typedef enum lm_error {
|
|
|
|
LM_ERR_NoError = 0,
|
2024-06-20 22:36:56 +00:00
|
|
|
LM_ERR_URLBadChar = 1,
|
2024-06-20 00:34:32 +00:00
|
|
|
LM_ERR_URLBadProtocol = 2,
|
2024-06-20 22:36:56 +00:00
|
|
|
LM_ERR_URLTooLarge = 3,
|
|
|
|
LM_ERR_URLHostLarge = 4,
|
|
|
|
LM_ERR_URLPathLarge = 5,
|
|
|
|
LM_ERR_URLBadHost = 6,
|
|
|
|
LM_ERR_URLBadPath = 7,
|
2024-06-20 00:34:32 +00:00
|
|
|
LM_ERR_URLPortUnknown = 8,
|
2024-06-20 22:36:56 +00:00
|
|
|
LM_ERR_URLBadPort = 9,
|
|
|
|
LM_ERR_PoolNoSupport = 10,
|
|
|
|
LM_ERR_URLEnd = 11,
|
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();
|