[Yunq] Return status from client calls.
This commit is contained in:
parent
700f3f94cb
commit
c209925a3c
25 changed files with 102 additions and 112 deletions
|
|
@ -11,11 +11,11 @@ class Status {
|
|||
Status(ErrorCode code) : code_(code), message_() {}
|
||||
Status(ErrorCode code, StringView message) : code_(code), message_(message) {}
|
||||
|
||||
explicit operator bool() { return ok(); }
|
||||
bool ok() { return code_ == OK; }
|
||||
explicit operator bool() const { return ok(); }
|
||||
bool ok() const { return code_ == OK; }
|
||||
|
||||
ErrorCode code() { return code_; }
|
||||
StringView message() { return message_; }
|
||||
ErrorCode code() const { return code_; }
|
||||
StringView message() const { return message_; }
|
||||
|
||||
private:
|
||||
ErrorCode code_;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue