STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Macros | Typedefs | Enumerations | Functions
system_error File Reference
#include <cerrno>
#include <cstdlib>
#include <stdexcept>

Classes

struct  is_error_code_enum< _Enum >
 
struct  is_error_code_enum< _Io_errc >
 
struct  is_error_condition_enum< _Enum >
 
struct  is_error_condition_enum< _Errc >
 
class  error_category
 
class  error_code
 
class  error_condition
 
struct  hash< error_code >
 
class  _System_error
 
class  system_error
 
class  _Generic_error_category
 
class  _Iostream_error_category
 
class  _System_error_category
 
struct  _Immortalizer< _Ty >
 

Macros

#define _SYSTEM_ERROR_
 

Typedefs

typedef errc _Errc
 
typedef io_errc _Io_errc
 

Enumerations

enum  errc {
  errc::address_family_not_supported = EAFNOSUPPORT, errc::address_in_use = EADDRINUSE, errc::address_not_available = EADDRNOTAVAIL, errc::already_connected = EISCONN,
  errc::argument_list_too_long = E2BIG, errc::argument_out_of_domain = EDOM, errc::bad_address = EFAULT, errc::bad_file_descriptor = EBADF,
  errc::bad_message = EBADMSG, errc::broken_pipe = EPIPE, errc::connection_aborted = ECONNABORTED, errc::connection_already_in_progress = EALREADY,
  errc::connection_refused = ECONNREFUSED, errc::connection_reset = ECONNRESET, errc::cross_device_link = EXDEV, errc::destination_address_required = EDESTADDRREQ,
  errc::device_or_resource_busy = EBUSY, errc::directory_not_empty = ENOTEMPTY, errc::executable_format_error = ENOEXEC, errc::file_exists = EEXIST,
  errc::file_too_large = EFBIG, errc::filename_too_long = ENAMETOOLONG, errc::function_not_supported = ENOSYS, errc::host_unreachable = EHOSTUNREACH,
  errc::identifier_removed = EIDRM, errc::illegal_byte_sequence = EILSEQ, errc::inappropriate_io_control_operation = ENOTTY, errc::interrupted = EINTR,
  errc::invalid_argument = EINVAL, errc::invalid_seek = ESPIPE, errc::io_error = EIO, errc::is_a_directory = EISDIR,
  errc::message_size = EMSGSIZE, errc::network_down = ENETDOWN, errc::network_reset = ENETRESET, errc::network_unreachable = ENETUNREACH,
  errc::no_buffer_space = ENOBUFS, errc::no_child_process = ECHILD, errc::no_link = ENOLINK, errc::no_lock_available = ENOLCK,
  errc::no_message_available = ENODATA, errc::no_message = ENOMSG, errc::no_protocol_option = ENOPROTOOPT, errc::no_space_on_device = ENOSPC,
  errc::no_stream_resources = ENOSR, errc::no_such_device_or_address = ENXIO, errc::no_such_device = ENODEV, errc::no_such_file_or_directory = ENOENT,
  errc::no_such_process = ESRCH, errc::not_a_directory = ENOTDIR, errc::not_a_socket = ENOTSOCK, errc::not_a_stream = ENOSTR,
  errc::not_connected = ENOTCONN, errc::not_enough_memory = ENOMEM, errc::not_supported = ENOTSUP, errc::operation_canceled = ECANCELED,
  errc::operation_in_progress = EINPROGRESS, errc::operation_not_permitted = EPERM, errc::operation_not_supported = EOPNOTSUPP, errc::operation_would_block = EWOULDBLOCK,
  errc::owner_dead = EOWNERDEAD, errc::permission_denied = EACCES, errc::protocol_error = EPROTO, errc::protocol_not_supported = EPROTONOSUPPORT,
  errc::read_only_file_system = EROFS, errc::resource_deadlock_would_occur = EDEADLK, errc::resource_unavailable_try_again = EAGAIN, errc::result_out_of_range = ERANGE,
  errc::state_not_recoverable = ENOTRECOVERABLE, errc::stream_timeout = ETIME, errc::text_file_busy = ETXTBSY, errc::timed_out = ETIMEDOUT,
  errc::too_many_files_open_in_system = ENFILE, errc::too_many_files_open = EMFILE, errc::too_many_links = EMLINK, errc::too_many_symbolic_link_levels = ELOOP,
  errc::value_too_large = EOVERFLOW, errc::wrong_protocol_type = EPROTOTYPE
}
 
enum  io_errc { io_errc::stream = 1 }
 

Functions

error_code make_error_code (_Errc) _NOEXCEPT
 
error_code make_error_code (_Io_errc) _NOEXCEPT
 
error_condition make_error_condition (_Errc) _NOEXCEPT
 
error_condition make_error_condition (_Io_errc) _NOEXCEPT
 
const error_categorygeneric_category () _NOEXCEPT
 
const error_categoryiostream_category () _NOEXCEPT
 
const error_categorysystem_category () _NOEXCEPT
 
bool operator== (const error_code &_Left, const error_code &_Right) _NOEXCEPT
 
bool operator== (const error_code &_Left, const error_condition &_Right) _NOEXCEPT
 
bool operator== (const error_condition &_Left, const error_code &_Right) _NOEXCEPT
 
bool operator== (const error_condition &_Left, const error_condition &_Right) _NOEXCEPT
 
bool operator!= (const error_code &_Left, const error_code &_Right) _NOEXCEPT
 
bool operator!= (const error_code &_Left, const error_condition &_Right) _NOEXCEPT
 
bool operator!= (const error_condition &_Left, const error_code &_Right) _NOEXCEPT
 
bool operator!= (const error_condition &_Left, const error_condition &_Right) _NOEXCEPT
 
bool operator< (const error_code &_Left, const error_code &_Right) _NOEXCEPT
 
bool operator< (const error_condition &_Left, const error_condition &_Right) _NOEXCEPT
 
_CRTIMP2_PURE const char *__CLRCALL_PURE_OR_CDECL _Syserror_map (int)
 
_CRTIMP2_PURE int __CLRCALL_PURE_OR_CDECL _Winerror_map (int)
 
_CRTIMP2_PURE unsigned long __CLRCALL_PURE_OR_CDECL _Winerror_message (unsigned long _Message_id, char *_Narrow, unsigned long _Size)
 
template<class _Ty >
_Ty & _Immortalize ()
 

Macro Definition Documentation

#define _SYSTEM_ERROR_

Typedef Documentation

typedef errc _Errc
typedef io_errc _Io_errc

Enumeration Type Documentation

enum errc
strong
Enumerator
address_family_not_supported 
address_in_use 
address_not_available 
already_connected 
argument_list_too_long 
argument_out_of_domain 
bad_address 
bad_file_descriptor 
bad_message 
broken_pipe 
connection_aborted 
connection_already_in_progress 
connection_refused 
connection_reset 
cross_device_link 
destination_address_required 
device_or_resource_busy 
directory_not_empty 
executable_format_error 
file_exists 
file_too_large 
filename_too_long 
function_not_supported 
host_unreachable 
identifier_removed 
illegal_byte_sequence 
inappropriate_io_control_operation 
interrupted 
invalid_argument 
invalid_seek 
io_error 
is_a_directory 
message_size 
network_down 
network_reset 
network_unreachable 
no_buffer_space 
no_child_process 
no_link 
no_lock_available 
no_message_available 
no_message 
no_protocol_option 
no_space_on_device 
no_stream_resources 
no_such_device_or_address 
no_such_device 
no_such_file_or_directory 
no_such_process 
not_a_directory 
not_a_socket 
not_a_stream 
not_connected 
not_enough_memory 
not_supported 
operation_canceled 
operation_in_progress 
operation_not_permitted 
operation_not_supported 
operation_would_block 
owner_dead 
permission_denied 
protocol_error 
protocol_not_supported 
read_only_file_system 
resource_deadlock_would_occur 
resource_unavailable_try_again 
result_out_of_range 
state_not_recoverable 
stream_timeout 
text_file_busy 
timed_out 
too_many_files_open_in_system 
too_many_files_open 
too_many_links 
too_many_symbolic_link_levels 
value_too_large 
wrong_protocol_type 
24  { // names for generic error codes
25  address_family_not_supported = EAFNOSUPPORT,
26  address_in_use = EADDRINUSE,
27  address_not_available = EADDRNOTAVAIL,
28  already_connected = EISCONN,
29  argument_list_too_long = E2BIG,
31  bad_address = EFAULT,
32  bad_file_descriptor = EBADF,
33  bad_message = EBADMSG,
34  broken_pipe = EPIPE,
35  connection_aborted = ECONNABORTED,
37  connection_refused = ECONNREFUSED,
38  connection_reset = ECONNRESET,
39  cross_device_link = EXDEV,
40  destination_address_required = EDESTADDRREQ,
42  directory_not_empty = ENOTEMPTY,
43  executable_format_error = ENOEXEC,
44  file_exists = EEXIST,
45  file_too_large = EFBIG,
46  filename_too_long = ENAMETOOLONG,
47  function_not_supported = ENOSYS,
48  host_unreachable = EHOSTUNREACH,
49  identifier_removed = EIDRM,
50  illegal_byte_sequence = EILSEQ,
52  interrupted = EINTR,
53  invalid_argument = EINVAL,
54  invalid_seek = ESPIPE,
55  io_error = EIO,
56  is_a_directory = EISDIR,
57  message_size = EMSGSIZE,
58  network_down = ENETDOWN,
59  network_reset = ENETRESET,
60  network_unreachable = ENETUNREACH,
61  no_buffer_space = ENOBUFS,
62  no_child_process = ECHILD,
63  no_link = ENOLINK,
64  no_lock_available = ENOLCK,
65  no_message_available = ENODATA,
66  no_message = ENOMSG,
67  no_protocol_option = ENOPROTOOPT,
68  no_space_on_device = ENOSPC,
69  no_stream_resources = ENOSR,
71  no_such_device = ENODEV,
73  no_such_process = ESRCH,
74  not_a_directory = ENOTDIR,
75  not_a_socket = ENOTSOCK,
76  not_a_stream = ENOSTR,
77  not_connected = ENOTCONN,
78  not_enough_memory = ENOMEM,
79  not_supported = ENOTSUP,
80  operation_canceled = ECANCELED,
81  operation_in_progress = EINPROGRESS,
83  operation_not_supported = EOPNOTSUPP,
84  operation_would_block = EWOULDBLOCK,
85  owner_dead = EOWNERDEAD,
86  permission_denied = EACCES,
87  protocol_error = EPROTO,
88  protocol_not_supported = EPROTONOSUPPORT,
89  read_only_file_system = EROFS,
92  result_out_of_range = ERANGE,
93  state_not_recoverable = ENOTRECOVERABLE,
94  stream_timeout = ETIME,
95  text_file_busy = ETXTBSY,
96  timed_out = ETIMEDOUT,
98  too_many_files_open = EMFILE,
99  too_many_links = EMLINK,
101  value_too_large = EOVERFLOW,
102  wrong_protocol_type = EPROTOTYPE
103  };
Definition: stdexcept:71
enum io_errc
strong
Enumerator
stream 
109  { // error codes for ios_base::failure
110  stream = 1
111  };

Function Documentation

template<class _Ty >
_Ty& _Immortalize ( )
inline
697  { // return a reference to an object that will live forever
698  /* MAGIC */ static _Immortalizer<_Ty> _Static;
699  return (*reinterpret_cast<_Ty *>(&_Static._Storage));
700  }
Definition: system_error:678
aligned_union< 1, _Ty >::type _Storage
Definition: system_error:692
_CRTIMP2_PURE const char* __CLRCALL_PURE_OR_CDECL _Syserror_map ( int  )
_CRTIMP2_PURE int __CLRCALL_PURE_OR_CDECL _Winerror_map ( int  )
_CRTIMP2_PURE unsigned long __CLRCALL_PURE_OR_CDECL _Winerror_message ( unsigned long  _Message_id,
char *  _Narrow,
unsigned long  _Size 
)
const error_category & generic_category ( )
inline
703  { // get generic_category
704  return (_Immortalize<_Generic_error_category>());
705  }
const error_category & iostream_category ( )
inline
708  { // get iostream_category
709  return (_Immortalize<_Iostream_error_category>());
710  }
error_code make_error_code ( _Errc  _Errno)
inline
474  { // make an error_code
475  return (error_code((int)_Errno, generic_category()));
476  }
Definition: system_error:221
const error_category & generic_category() _NOEXCEPT
Definition: system_error:702
error_code make_error_code ( _Io_errc  _Errno)
inline
479  { // make an error_code
480  return (error_code((int)_Errno, iostream_category()));
481  }
Definition: system_error:221
const error_category & iostream_category() _NOEXCEPT
Definition: system_error:707
error_condition make_error_condition ( _Errc  _Errno)
inline
485  { // make an error_condition
486  return (error_condition((int)_Errno, generic_category()));
487  }
const error_category & generic_category() _NOEXCEPT
Definition: system_error:702
Definition: system_error:294
error_condition make_error_condition ( _Io_errc  _Errno)
inline
490  { // make an error_condition
491  return (error_condition((int)_Errno, iostream_category()));
492  }
const error_category & iostream_category() _NOEXCEPT
Definition: system_error:707
Definition: system_error:294
bool operator!= ( const error_code _Left,
const error_code _Right 
)
inline
401  { // test errors for inequality
402  return (!(_Left == _Right));
403  }
bool operator!= ( const error_code _Left,
const error_condition _Right 
)
inline
408  { // test errors for inequality
409  return (!(_Left == _Right));
410  }
bool operator!= ( const error_condition _Left,
const error_code _Right 
)
inline
415  { // test errors for inequality
416  return (!(_Left == _Right));
417  }
bool operator!= ( const error_condition _Left,
const error_condition _Right 
)
inline
422  { // test errors for inequality
423  return (!(_Left == _Right));
424  }
bool operator< ( const error_code _Left,
const error_code _Right 
)
inline
430  { // test if _Left < _Right
431  return (_Left.category() < _Right.category()
432  || (_Left.category() == _Right.category()
433  && _Left.value() < _Right.value()));
434  }
int value() const _NOEXCEPT
Definition: system_error:266
const error_category & category() const _NOEXCEPT
Definition: system_error:271
bool operator< ( const error_condition _Left,
const error_condition _Right 
)
inline
439  { // test if _Left < _Right
440  return (_Left.category() < _Right.category()
441  || (_Left.category() == _Right.category()
442  && _Left.value() < _Right.value()));
443  }
const error_category & category() const _NOEXCEPT
Definition: system_error:344
int value() const _NOEXCEPT
Definition: system_error:339
bool operator== ( const error_code _Left,
const error_code _Right 
)
inline
368  { // test errors for equality
369  return (_Left.category() == _Right.category()
370  && _Left.value() == _Right.value());
371  }
int value() const _NOEXCEPT
Definition: system_error:266
const error_category & category() const _NOEXCEPT
Definition: system_error:271
bool operator== ( const error_code _Left,
const error_condition _Right 
)
inline
376  { // test errors for equality
377  return (_Left.category().equivalent(_Left.value(), _Right)
378  || _Right.category().equivalent(_Left, _Right.value()));
379  }
int value() const _NOEXCEPT
Definition: system_error:266
const error_category & category() const _NOEXCEPT
Definition: system_error:344
const error_category & category() const _NOEXCEPT
Definition: system_error:271
virtual bool equivalent(int _Errval, const error_condition &_Cond) const _NOEXCEPT
Definition: system_error:453
int value() const _NOEXCEPT
Definition: system_error:339
constexpr const _Ty &() _Right
Definition: algorithm:3591
bool operator== ( const error_condition _Left,
const error_code _Right 
)
inline
384  { // test errors for equality
385  return (_Right.category().equivalent(_Right.value(), _Left)
386  || _Left.category().equivalent(_Right, _Left.value()));
387  }
int value() const _NOEXCEPT
Definition: system_error:266
const error_category & category() const _NOEXCEPT
Definition: system_error:344
const error_category & category() const _NOEXCEPT
Definition: system_error:271
constexpr const _Ty &() _Left
Definition: algorithm:3590
virtual bool equivalent(int _Errval, const error_condition &_Cond) const _NOEXCEPT
Definition: system_error:453
int value() const _NOEXCEPT
Definition: system_error:339
bool operator== ( const error_condition _Left,
const error_condition _Right 
)
inline
392  { // test errors for equality
393  return (_Left.category() == _Right.category()
394  && _Left.value() == _Right.value());
395  }
const error_category & category() const _NOEXCEPT
Definition: system_error:344
int value() const _NOEXCEPT
Definition: system_error:339
const error_category & system_category ( )
inline
713  { // get system_category
714  return (_Immortalize<_System_error_category>());
715  }