libmp/include/error.h
2024-06-20 03:34:32 +03:00

26 lines
537 B
C

#pragma once
typedef enum lm_error {
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_error_t;
typedef struct lm_error_desc {
lm_error_t code;
char *desc;
} lm_error_desc_t;
void lm_error_set(lm_error_t code);
lm_error_t lm_error();
char *lm_strerror();