enh: support get macro string of taos errors

This commit is contained in:
kailixu 2024-06-13 10:13:24 +08:00
parent a876164b33
commit 6f667d9314
2 changed files with 2 additions and 4 deletions

View File

@ -30,6 +30,8 @@ typedef struct {
const char* macro;
} STaosError;
extern STaosError errors[];
#define TAOS_DEF_ERROR_CODE(mod, code) ((int32_t)((0x80000000 | ((mod)<<16) | (code))))
#define TAOS_SYSTEM_ERROR(code) (0x80ff0000 | (code))

View File

@ -1,13 +1,9 @@
#include <gtest/gtest.h>
#include <cassert>
#define TAOS_ERROR_INFO
#include <iostream>
#include "taoserror.h"
extern STaosError errors[];
using namespace std;
TEST(TAOS_ERROR_TEST, terror_test) {