Clementine
|
Class to represent an error code value. More...
#include <error_code.hpp>
Classes | |
struct | unspecified_bool_type_t |
Public Types | |
typedef void(* | unspecified_bool_type) (unspecified_bool_type_t) |
Public Member Functions | |
error_code () | |
Default constructor. | |
error_code (int v, const error_category &c) | |
Construct with specific error code and category. | |
template<typename ErrorEnum > | |
error_code (ErrorEnum e) | |
Construct from an error code enum. | |
void | clear () |
Clear the error value to the default. | |
void | assign (int v, const error_category &c) |
Assign a new error value. | |
int | value () const |
Get the error value. | |
const error_category & | category () const |
Get the error category. | |
std::string | message () const |
Get the message associated with the error. | |
operator unspecified_bool_type () const | |
Operator returns non-null if there is a non-success error code. | |
bool | operator! () const |
Operator to test if the error represents success. | |
Static Public Member Functions | |
static void | unspecified_bool_true (unspecified_bool_type_t) |
Friends | |
bool | operator== (const error_code &e1, const error_code &e2) |
Equality operator to compare two error objects. | |
bool | operator!= (const error_code &e1, const error_code &e2) |
Inequality operator to compare two error objects. | |
Class to represent an error code value.