MCPcopy Create free account
hub / github.com/cinder/Cinder / error_code

Class error_code

include/asio/error_code.hpp:80–177  ·  view source on GitHub ↗

Class to represent an error code value.

Source from the content-addressed store, hash-verified

78
79/// Class to represent an error code value.
80class error_code
81{
82public:
83 /// Default constructor.
84 error_code()
85 : value_(0),
86 category_(&system_category())
87 {
88 }
89
90 /// Construct with specific error code and category.
91 error_code(int v, const error_category& c)
92 : value_(v),
93 category_(&c)
94 {
95 }
96
97 /// Construct from an error code enum.
98 template <typename ErrorEnum>
99 error_code(ErrorEnum e)
100 {
101 *this = make_error_code(e);
102 }
103
104 /// Clear the error value to the default.
105 void clear()
106 {
107 value_ = 0;
108 category_ = &system_category();
109 }
110
111 /// Assign a new error value.
112 void assign(int v, const error_category& c)
113 {
114 value_ = v;
115 category_ = &c;
116 }
117
118 /// Get the error value.
119 int value() const
120 {
121 return value_;
122 }
123
124 /// Get the error category.
125 const error_category& category() const
126 {
127 return *category_;
128 }
129
130 /// Get the message associated with the error.
131 std::string message() const
132 {
133 return category_->message(value_);
134 }
135
136 struct unspecified_bool_type_t
137 {

Callers 15

shutdownMethod · 0.85
make_error_codeFunction · 0.85
in_availMethod · 0.85
connectMethod · 0.85
connect_to_endpointsMethod · 0.85
destroyFunction · 0.85
openMethod · 0.85
assignMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected