libstdc++: std::error_category Class Reference (original) (raw)
Abstract base class for types defining a category of error codes.
An error category defines a context that gives meaning to the integer stored in an error_code
or error_condition
object. For example, the standard errno
constants such a EINVAL
and ENOMEM
are associated with the "generic" category and other OS-specific error numbers are associated with the "system" category, but a user-defined category might give different meanings to the same numerical values.
A user-defined category can override the equivalent
member functions to define correspondence between errors in different categories. For example, a category for errors from disk I/O could consider some of its error numbers equivalent to ENOSPC and ENOENT in the generic category.
Since
C++11
Definition at line 106 of file system_error.