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 char * name () 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
640  { // default constructor
642  }
uintptr_t _Addr
Definition: system_error:209
Definition: system_error:216

Member Function Documentation

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

Reimplemented from error_category.

667  { // make error_condition for error code (generic if possible)
668  int _Posv = _Winerror_map(_Errval);
669 
670  if (_Posv != 0)
671  return (error_condition(_Posv, generic_category()));
672  else
673  return (error_condition(_Errval, system_category()));
674  }
const error_category & system_category() _NOEXCEPT
Definition: system_error:712
const error_category & generic_category() _NOEXCEPT
Definition: system_error:702
Definition: system_error:294
_CRTIMP2_PURE int __CLRCALL_PURE_OR_CDECL _Winerror_map(int)
virtual string _System_error_category::message ( int  _Errcode) const
inlinevirtual

Implements error_category.

650  { // convert to name of error
651  const unsigned long _Size = 32767;
652  string _Narrow(_Size, '\0');
653 
654  const unsigned long _Val = _Winerror_message(
655  static_cast<unsigned long>(_Errcode), &_Narrow[0], _Size);
656 
657  if (_Val == 0)
658  return ("unknown error");
659 
660  _Narrow.resize(_Val);
661  _Narrow.shrink_to_fit();
662  return (_Narrow);
663  }
_CRTIMP2_PURE unsigned long __CLRCALL_PURE_OR_CDECL _Winerror_message(unsigned long _Message_id, char *_Narrow, unsigned long _Size)
_In_ int _Val
Definition: vcruntime_string.h:62
_Size
Definition: vcruntime_string.h:36
virtual const char* _System_error_category::name ( ) const
inlinevirtual

Implements error_category.

645  { // get name of category
646  return ("system");
647  }

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