Browse Source

回退 'Pull Request !418 : ge_api_error_codes.h delete ascend_string.h'

tags/v1.1.0
计晨 Gitee 4 years ago
parent
commit
009920c7d1
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      inc/external/ge/ge_api_error_codes.h

+ 8
- 0
inc/external/ge/ge_api_error_codes.h View File

@@ -20,6 +20,7 @@
#include <map> #include <map>
#include <string> #include <string>
#include "ge_error_codes.h" #include "ge_error_codes.h"
#include "graph/ascend_string.h"


namespace ge { namespace ge {
#ifdef __GNUC__ #ifdef __GNUC__
@@ -62,6 +63,13 @@ class StatusFactory {
return iter_find->second; return iter_find->second;
} }


void GetErrDesc(uint32_t err, AscendString &err_desc) {
auto iter_find = err_desc_.find(err);
if (iter_find != err_desc_.end()) {
err_desc = AscendString((iter_find->second).c_str());
}
}

protected: protected:
StatusFactory() {} StatusFactory() {}
~StatusFactory() {} ~StatusFactory() {}


Loading…
Cancel
Save