.TH "std::error_code" 3cxx "Thu Feb 16 2023" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::error_code .SH SYNOPSIS .br .PP .SS "Public Member Functions" .in +1c .ti -1c .RI "template::value>::type> \fBerror_code\fP (_ErrorCodeEnum __e) noexcept" .br .ti -1c .RI "\fBerror_code\fP (int __v, const \fBerror_category\fP &__cat) noexcept" .br .ti -1c .RI "void \fBassign\fP (int __v, const \fBerror_category\fP &__cat) noexcept" .br .ti -1c .RI "const \fBerror_category\fP & \fBcategory\fP () const noexcept" .br .ti -1c .RI "void \fBclear\fP () noexcept" .br .ti -1c .RI "\fBerror_condition\fP \fBdefault_error_condition\fP () const noexcept" .br .ti -1c .RI "\fBstring\fP \fBmessage\fP () const" .br .ti -1c .RI "\fBoperator bool\fP () const noexcept" .br .ti -1c .RI "template \fBenable_if\fP< \fBis_error_code_enum\fP< _ErrorCodeEnum >::value, \fBerror_code\fP & >::type \fBoperator=\fP (_ErrorCodeEnum __e) noexcept" .br .ti -1c .RI "int \fBvalue\fP () const noexcept" .br .in -1c .SS "Related Functions" (Note that these are not member functions\&.) .in +1c .ti -1c .RI "\fBerror_condition\fP \fBmake_error_condition\fP (errc) noexcept" .br .ti -1c .RI "bool \fBoperator!=\fP (const \fBerror_code\fP &__lhs, const \fBerror_code\fP &__rhs) noexcept" .br .ti -1c .RI "bool \fBoperator!=\fP (const \fBerror_code\fP &__lhs, const \fBerror_condition\fP &__rhs) noexcept" .br .ti -1c .RI "bool \fBoperator==\fP (const \fBerror_code\fP &__lhs, const \fBerror_code\fP &__rhs) noexcept" .br .ti -1c .RI "bool \fBoperator==\fP (const \fBerror_code\fP &__lhs, const \fBerror_condition\fP &__rhs) noexcept" .br .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "\fBerror_code\fP \fBmake_error_code\fP (errc __e) noexcept" .br .in -1c .in -1c .SH "Detailed Description" .PP Class error_code .PP This class is a value type storing an integer error number and a category that gives meaning to the error number\&. Typically this is done close the the point where the error happens, to capture the original error value\&. .PP An \fCerror_code\fP object can be used to store the original error value emitted by some subsystem, with a category relevant to the subsystem\&. For example, errors from POSIX library functions can be represented by an \fCerrno\fP value and the 'generic' category, but errors from an HTTP library might be represented by an HTTP response status code (e\&.g\&. 404) and a custom category defined by the library\&. .PP \fBSince\fP .RS 4 C++11 .RE .PP .PP Definition at line \fB196\fP of file \fBsystem_error\fP\&. .SH "Constructor & Destructor Documentation" .PP .SS "std::error_code::error_code ()\fC [inline]\fP, \fC [noexcept]\fP" .PP Definition at line \fB199\fP of file \fBsystem_error\fP\&. .SS "std::error_code::error_code (int __v, const \fBerror_category\fP & __cat)\fC [inline]\fP, \fC [noexcept]\fP" .PP Definition at line \fB202\fP of file \fBsystem_error\fP\&. .SS "template::value>::type> std::error_code::error_code (_ErrorCodeEnum __e)\fC [inline]\fP, \fC [noexcept]\fP" .PP Definition at line \fB207\fP of file \fBsystem_error\fP\&. .SH "Member Function Documentation" .PP .SS "void std::error_code::assign (int __v, const \fBerror_category\fP & __cat)\fC [inline]\fP, \fC [noexcept]\fP" .PP Definition at line \fB211\fP of file \fBsystem_error\fP\&. .SS "const \fBerror_category\fP & std::error_code::category () const\fC [inline]\fP, \fC [noexcept]\fP" .PP Definition at line \fB232\fP of file \fBsystem_error\fP\&. .SS "void std::error_code::clear ()\fC [inline]\fP, \fC [noexcept]\fP" .PP Definition at line \fB218\fP of file \fBsystem_error\fP\&. .SS "\fBstring\fP std::error_code::message () const\fC [inline]\fP" .PP Definition at line \fB239\fP of file \fBsystem_error\fP\&. .SS "std::error_code::operator bool () const\fC [inline]\fP, \fC [explicit]\fP, \fC [noexcept]\fP" .PP Definition at line \fB242\fP of file \fBsystem_error\fP\&. .SS "template \fBenable_if\fP< \fBis_error_code_enum\fP< _ErrorCodeEnum >::value, \fBerror_code\fP & >::type std::error_code::operator= (_ErrorCodeEnum __e)\fC [inline]\fP, \fC [noexcept]\fP" .PP Definition at line \fB225\fP of file \fBsystem_error\fP\&. .SS "int std::error_code::value () const\fC [inline]\fP, \fC [noexcept]\fP" .PP Definition at line \fB229\fP of file \fBsystem_error\fP\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.