Browse Source

error message add

tags/v1.1.0
wangwenhua1@huawei.com 3 years ago
parent
commit
692cf7fd3d
1 changed files with 13 additions and 14 deletions
  1. +13
    -14
      inc/framework/common/debug/log.h

+ 13
- 14
inc/framework/common/debug/log.h View File

@@ -83,12 +83,12 @@
} while (0);

// If expr is not GRAPH_SUCCESS, print the log and return FAILED
#define GE_CHK_GRAPH_STATUS_RET(expr, ...) \
do { \
if ((expr) != ge::GRAPH_SUCCESS) { \
DOMI_LOGE(__VA_ARGS__); \
return FAILED; \
} \
#define GE_CHK_GRAPH_STATUS_RET(expr, ...) \
do { \
if ((expr) != ge::GRAPH_SUCCESS) { \
DOMI_LOGE(__VA_ARGS__); \
return FAILED; \
} \
} while (0);

// If expr is not SUCCESS, print the log and execute a custom statement
@@ -99,13 +99,13 @@
} while (0);

// If expr is not true, print the log and return the specified status
#define GE_CHK_BOOL_RET_STATUS(expr, _status, ...) \
do { \
bool b = (expr); \
if (!b) { \
GELOGE(_status, __VA_ARGS__); \
return _status; \
} \
#define GE_CHK_BOOL_RET_STATUS(expr, _status, ...) \
do { \
bool b = (expr); \
if (!b) { \
GELOGE(_status, __VA_ARGS__); \
return _status; \
} \
} while (0);

// If expr is not true, print the log and return the specified status
@@ -259,7 +259,6 @@
ErrorManager::GetInstance().ATCReportErrMessage("E10043", {"reason"}, {errormsg}); \
}


#define GE_CHK_LOG_AND_ERRORMSG(expr, _status, errormsg) \
do { \
bool b = (expr); \


Loading…
Cancel
Save