enh: support get macro string of taos errors
This commit is contained in:
parent
a876164b33
commit
6f667d9314
|
@ -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))
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue