18 lines
424 B
C
18 lines
424 B
C
//
|
|
// Created by xajhuang on 2022/12/5.
|
|
//
|
|
#include <user_errno.h>
|
|
|
|
#define MAX_DESC_LENGTH (256)
|
|
#define GENERATE_STRING(STRING, desc) {#STRING, desc},
|
|
|
|
static const char *g_enumStrVal[][MAX_DESC_LENGTH] = {DEF_ERR_CODE(GENERATE_STRING)};
|
|
|
|
const char *getErrorEnumString(int errCode) {
|
|
return g_enumStrVal[errCode][0];
|
|
}
|
|
|
|
const char *getErrorEnumDesc(int errCode) {
|
|
return g_enumStrVal[errCode][1];
|
|
}
|