|
| Status () |
| Creates a "successful" status.
|
|
| Status (error::Code error_code, const std::string &error_message) |
|
void | Update (Status new_status) |
|
bool | ok () const |
|
error::Code | error_code () const |
|
const std::string & | error_message () const |
|
bool | operator== (const Status &x) const |
|
bool | operator!= (const Status &x) const |
|
std::string | ToString () const |
|
Definition at line 110 of file status.h.
◆ Status()
shaka::Status::Status |
( |
error::Code |
error_code, |
|
|
const std::string & |
error_message |
|
) |
| |
Create a status with the specified code, and error message. If "error_code == error::OK", error_message is ignored and a Status object identical to Status::OK is constructed.
Definition at line 69 of file status.cc.
◆ ToString()
std::string shaka::Status::ToString |
( |
| ) |
const |
- Returns
- A combination of the error code name and message.
Definition at line 83 of file status.cc.
◆ Update()
void shaka::Status::Update |
( |
Status |
new_status | ) |
|
If "ok()", stores "new_status" into *this. If "!ok()", preserves the current "error_code()/error_message()",
Convenient way of keeping track of the first error encountered. Instead of: if (overall_status.ok()) overall_status = new_status Use: overall_status.Update(new_status);
Definition at line 78 of file status.cc.
The documentation for this class was generated from the following files: