|
| Status () |
| Creates a "successful" status.
|
|
| Status (error::Code error_code, const std::string &error_message) |
|
void | SetError (error::Code error_code, const std::string &error_message) |
|
void | Update (const Status &new_status) |
|
void | Clear () |
| Clear this status object to contain the OK code and no error message.
|
|
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 |
|
bool | Matches (const Status &x) const |
|
std::string | ToString () const |
|
void | Swap (Status *other) |
|
Definition at line 82 of file status.h.
shaka::media::Status::Status |
( |
error::Code |
error_code, |
|
|
const std::string & |
error_message |
|
) |
| |
|
inline |
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 90 of file status.h.
bool shaka::media::Status::Matches |
( |
const Status & |
x | ) |
const |
|
inline |
- Returns
- true iff this has the same error_code as "x", i.e., the two Status objects are identical except possibly for the error message.
Definition at line 147 of file status.h.
void shaka::media::Status::SetError |
( |
error::Code |
error_code, |
|
|
const std::string & |
error_message |
|
) |
| |
|
inline |
Store the specified error in this Status object. If "error_code == error::OK", error_message is ignored and a Status object identical to Status::OK is constructed.
Definition at line 107 of file status.h.
std::string shaka::media::Status::ToString |
( |
| ) |
const |
- Returns
- A combination of the error code name and message.
Definition at line 60 of file status.cc.
void shaka::media::Status::Update |
( |
const Status & |
new_status | ) |
|
|
inline |
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 124 of file status.h.
The documentation for this class was generated from the following files: