From 6f667d93145a29a0ddeff971a27101ab26f5dd41 Mon Sep 17 00:00:00 2001 From: kailixu Date: Thu, 13 Jun 2024 10:13:24 +0800 Subject: [PATCH] enh: support get macro string of taos errors --- include/util/taoserror.h | 2 ++ source/util/test/terrorTest.cpp | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/util/taoserror.h b/include/util/taoserror.h index 3207d498d3..95d028a47e 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -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)) diff --git a/source/util/test/terrorTest.cpp b/source/util/test/terrorTest.cpp index 5ef5f43216..fbb698f780 100644 --- a/source/util/test/terrorTest.cpp +++ b/source/util/test/terrorTest.cpp @@ -1,13 +1,9 @@ #include #include -#define TAOS_ERROR_INFO - #include #include "taoserror.h" -extern STaosError errors[]; - using namespace std; TEST(TAOS_ERROR_TEST, terror_test) {