STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | List of all members
_System_error_category Class Reference
Inheritance diagram for _System_error_category:
error_category

Public Member Functions

 _System_error_category () _NOEXCEPT
 
virtual const charname () const _NOEXCEPT
 
virtual string message (int _Errcode) const
 
virtual error_condition default_error_condition (int _Errval) const _NOEXCEPT
 
- Public Member Functions inherited from error_category
 error_category () _NOEXCEPT
 
virtual ~error_category () _NOEXCEPT
 
virtual bool equivalent (int _Errval, const error_condition &_Cond) const _NOEXCEPT
 
virtual bool equivalent (const error_code &_Code, int _Errval) const _NOEXCEPT
 
bool operator== (const error_category &_Right) const _NOEXCEPT
 
bool operator!= (const error_category &_Right) const _NOEXCEPT
 
bool operator< (const error_category &_Right) const _NOEXCEPT
 
 error_category (const error_category &)=delete
 
error_categoryoperator= (const error_category &)=delete
 

Additional Inherited Members

- Protected Types inherited from error_category
enum  : uintptr_t { _Future_addr = 1, _Generic_addr = 3, _Iostream_addr = 5, _System_addr = 7 }
 
- Protected Attributes inherited from error_category
uintptr_t _Addr
 

Constructor & Destructor Documentation

_System_error_category::_System_error_category ( )
inline
637  { // default constructor
639  }
uintptr_t _Addr
Definition: system_error:206
Definition: system_error:213

Member Function Documentation

virtual error_condition _System_error_category::default_error_condition ( int  _Errval) const
inlinevirtual

Reimplemented from error_category.

664  { // make error_condition for error code (generic if possible)
665  int _Posv = _Winerror_map(_Errval);
666 
667  if (_Posv != 0)
668  return (error_condition(_Posv, generic_category()));
669  else
670  return (error_condition(_Errval, system_category()));
671  }
const error_category & system_category() _NOEXCEPT
Definition: system_error:709
const error_category & generic_category() _NOEXCEPT
Definition: system_error:699
Definition: system_error:291
_CRTIMP2_PURE int __CLRCALL_PURE_OR_CDECL _Winerror_map(int)
virtual string _System_error_category::message ( int  _Errcode) const
inlinevirtual

Implements error_category.

647  { // convert to name of error
648  const unsigned long _Size = 32767;
649  string _Narrow(_Size, '\0');
650 
651  const unsigned long _Val = _Winerror_message(
652  static_cast<unsigned long>(_Errcode), &_Narrow[0], _Size);
653 
654  if (_Val == 0)
655  return ("unknown error");
656 
657  _Narrow.resize(_Val);
658  _Narrow.shrink_to_fit();
659  return (_Narrow);
660  }
_CRTIMP2_PURE unsigned long __CLRCALL_PURE_OR_CDECL _Winerror_message(unsigned long _Message_id, char *_Narrow, unsigned long _Size)
_CRT_BEGIN_C_HEADER _Check_return_ _Ret_maybenull_ _In_ size_t _Size
Definition: corecrt_malloc.h:58
_FwdIt const _Ty _Val
Definition: algorithm:1938
virtual const char* _System_error_category::name ( ) const
inlinevirtual

Implements error_category.

642  { // get name of category
643  return ("system");
644  }

The documentation for this class was generated from the following file: