std::error_code(3)

NAME
std::error_code

SYNOPSIS

  Public Member Functions
template<typename _ErrorCodeEnum , typename = typename enable_if<is_error_code_enum<_ErrorCodeEnum>::value>::type> error_code (_ErrorCodeEnum __e) noexcept
error_code (int __v, const error_category &__cat) noexcept
void assign (int __v, const error_category &__cat) noexcept
const error_category & category () const noexcept
void clear () noexcept
error_condition default_error_condition () const noexcept
string message () const
operator bool () const noexcept
template<typename _ErrorCodeEnum > enable_if< is_error_code_enum< _ErrorCodeEnum >::value, error_code & >::type operator= (_ErrorCodeEnum __e) noexcept
int value () const noexcept

  Related Functions
(Note that these are not member functions.)
error_condition make_error_condition (errc) noexcept
bool operator!= (const error_code &__lhs, const error_code &__rhs) noexcept
bool operator!= (const error_code &__lhs, const error_condition &__rhs) noexcept
bool operator== (const error_code &__lhs, const error_code &__rhs) noexcept
bool operator== (const error_code &__lhs, const error_condition &__rhs) noexcept

error_code make_error_code (errc __e) noexcept

Detailed Description

Class error_code

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.

An error_code 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 errno 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.

Since
    C++11

Definition at line 196 of file std/system_error.

Constructor & Destructor Documentation

  std::error_code::error_code () [inline], [noexcept]

Definition at line 199 of file std/system_error.

  std::error_code::error_code (int __v, const error_category & __cat) [inline], [noexcept]

Definition at line 202 of file std/system_error.

  template<typename _ErrorCodeEnum , typename = typename enable_if<is_error_code_enum<_ErrorCodeEnum>::value>::type> std::error_code::error_code (_ErrorCodeEnum __e) [inline], [noexcept]

Definition at line 207 of file std/system_error.

Member Function Documentation

  void std::error_code::assign (int __v, const error_category & __cat) [inline], [noexcept]

Definition at line 211 of file std/system_error.

  const error_category & std::error_code::category () const [inline], [noexcept]

Definition at line 232 of file std/system_error.

  void std::error_code::clear () [inline], [noexcept]

Definition at line 218 of file std/system_error.

  string std::error_code::message () const [inline]

Definition at line 239 of file std/system_error.

  std::error_code::operator bool () const [inline], [explicit], [noexcept]

Definition at line 242 of file std/system_error.

  template<typename _ErrorCodeEnum > enable_if< is_error_code_enum< _ErrorCodeEnum >::value, error_code & >::type std::error_code::operator= (_ErrorCodeEnum __e) [inline], [noexcept]

Definition at line 225 of file std/system_error.

  int std::error_code::value () const [inline], [noexcept]

Definition at line 229 of file std/system_error.

Author

Generated automatically by Doxygen for libstdc++ from the source code.