std::error_category

From cppreference.com
 
 
 
Error handling
Exception handling
exception
uncaught_exception
exception_ptr (C++11)
make_exception_ptr (C++11)
current_exception (C++11)
rethrow_exception (C++11)
nested_exception (C++11)
throw_with_nested (C++11)
rethrow_if_nested (C++11)
Exception handling failures
terminate
terminate_handler
get_terminate (C++11)
set_terminate
unexpected (deprecated)
bad_exception
unexpected_handler (deprecated)
get_unexpected (C++11)(deprecated)
set_unexpected (deprecated)
Exception categories
logic_error
invalid_argument
domain_error
length_error
out_of_range
runtime_error
range_error
overflow_error
underflow_error
Error codes
Error codes
errno
Assertions
assert
system_error facility
error_category (C++11)
generic_category (C++11)
system_category (C++11)
error_condition (C++11)
errc (C++11)
error_code (C++11)
system_error (C++11)
 
 
Defined in header <system_error>
class error_category;
(since C++11)

std::error_category serves as the base class for specific error category types, such as system_category, iostream_category, etc. Each specific category class defines the error_code - error_condition mapping and holds the explanatory strings for all error_conditions. The objects of error category classes are treated as singletons, passed by reference.

[edit] Member functions

constructs an error_category
(public member function)
[virtual]
destructs an error_category
(virtual public member function)
the assignment operator is deleted
(public member function)
[virtual]
obtains the name of the category
(virtual public member function)
maps error_code to error_condition
(virtual public member function)
[virtual]
compares error_code and error_condition
(virtual public member function)
[virtual]
obtains the explanatory string for error_condition
(virtual public member function)
compares error_categories
(function)

[edit] Specific error categories

identifies the generic error category
(function)
identifies the operating system error category
(function)
identifies the iostream error category
(function)
identifies the future error category
(function)

[edit] See also

holds a portable error code
(class)
(C++11)
holds a platform-dependent error code
(class)