Fix merge error

This commit is contained in:
Jesse Lee 2020-09-25 10:04:51 -04:00
parent 0d8015b043
commit 70f7e1df3f
2 changed files with 14 additions and 2 deletions

View File

@ -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_;

View File

@ -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
};