IsOk接口
接口功能
获取返回对象状态,是否是正常状态。
接口格式
bool IsOk() const;
接口参数
无。
使用样例
auto error = Error(Code code = Code::OK); if (!error.IsOk()) { return -1; }
返回值
- true:返回正常,代表操作成功。
- false:返回异常,代表操作失败。
父主题: Error
获取返回对象状态,是否是正常状态。
bool IsOk() const;
无。
auto error = Error(Code code = Code::OK); if (!error.IsOk()) { return -1; }