|
| | Status (ErrorCode code=ErrorCode::OK, std::string_view msg="") |
| | Create a status with the specified error code and msg as a human-readable string containing more detailed information.
|
| |
| | ~Status ()=default |
| |
| bool | ok () const |
| | check whether the return status is OK.
|
| |
| ErrorCode | code () const |
| | get the error code
|
| |
| bool | operator== (const Status &rh) const |
| | defines the logic of testing if two Status are equal
|
| |
| bool | operator!= (const Status &rh) const |
| | defines the logic of testing if two Status are unequal
|
| |
| const std::string & | error_message () const |
| | returns the error message of the status, empty if the status is OK.
|
| |
| std::string | ToString () const |
| | returns a string representation in a readable format.
|
| |
| void | Save (StatusPb *status_pb) |
| | save the error_code and error message to protobuf
|
| |
A general class to denote the return status of an API call.
It can either be an OK status for success, or a failure status with error message and error code enum.
在文件 status.h 第 43 行定义.