!6900 Fix a merge error of status.h

Merge pull request !6900 from JesseKLee/status_merge_err
pull/6900/MERGE
mindspore-ci-bot 4 years ago committed by Gitee
commit 2a41f76f4f

@ -59,6 +59,13 @@ namespace dataset {
} \
} while (false)
#define RETURN_OK_IF_TRUE(_condition) \
do { \
if (_condition) { \
return Status::OK(); \
} \
} while (false)
enum class StatusCode : char {
kOK = 0,
kOutOfMemory = 1,
@ -74,6 +81,9 @@ enum class StatusCode : char {
kBoundingBoxOutOfBounds = 11,
kBoundingBoxInvalidShape = 12,
kSyntaxError = 13,
kTimeOut = 14,
kBuddySpaceFull = 15,
kNetWorkError = 16,
// Make this error code the last one. Add new error code above it.
kUnexpectedError = 127
};
@ -129,6 +139,8 @@ class Status {
bool IsNoSpace() const { return (get_code() == StatusCode::kNoSpace); }
bool IsNetWorkError() const { return (get_code() == StatusCode::kNetWorkError); }
private:
StatusCode code_;
std::string err_msg_;

@ -82,8 +82,8 @@ enum class StatusCode : char {
kBoundingBoxInvalidShape = 12,
kSyntaxError = 13,
kTimeOut = 14,
kBuddySpaceFull = 14,
kNetWorkError = 15,
kBuddySpaceFull = 15,
kNetWorkError = 16,
// Make this error code the last one. Add new error code above it.
kUnexpectedError = 127
};

Loading…
Cancel
Save