IsOk
Function
Checks whether the returned object status is normal.
Format
bool IsOk() const;
Parameters
None
Usage Example
Construct an Error object and invoke the IsOk interface to check whether the status is normal.
1 2 3 4 | auto error = Error(Code code = Code::OK); if (!error.IsOk()) { return -1; } |
Return Value
- true: The returned object status is normal, and the operation is successful.
- false: The returned object status is abnormal, and the operation fails.
Parent topic: Error