cplusplus
.com
教程
参考
文章
论坛
C++
教程
参考
文章
论坛
参考
C 库
<cassert> (assert.h)
<cctype> (ctype.h)
<cerrno> (errno.h)
C++11
<cfenv> (fenv.h)
<cfloat> (float.h)
C++11
<cinttypes> (inttypes.h)
<ciso646> (iso646.h)
<climits> (limits.h)
<clocale> (locale.h)
<cmath> (math.h)
<csetjmp> (setjmp.h)
<csignal> (signal.h)
<cstdarg> (stdarg.h)
C++11
<cstdbool> (stdbool.h)
<cstddef> (stddef.h)
C++11
<cstdint> (stdint.h)
<cstdio> (stdio.h)
<cstdlib> (stdlib.h)
<cstring> (string.h)
C++11
<ctgmath> (tgmath.h)
<ctime> (time.h)
C++11
<cuchar> (uchar.h)
<cwchar> (wchar.h)
<cwctype> (wctype.h)
容器
C++11
<array>
<deque>
C++11
<forward_list>
<list>
<map>
<queue>
<set>
<stack>
C++11
<unordered_map>
C++11
<unordered_set>
<vector>
输入/输出
<fstream>
<iomanip>
<ios>
<iosfwd>
<iostream>
<istream>
<ostream>
<sstream>
<streambuf>
多线程
C++11
<atomic>
C++11
<condition_variable>
C++11
<future>
C++11
<mutex>
C++11
<thread>
其他
<algorithm>
<bitset>
C++11
<chrono>
C++11
<codecvt>
<complex>
<exception>
<functional>
C++11
<initializer_list>
<iterator>
<limits>
<locale>
<memory>
<new>
<numeric>
C++11
<random>
C++11
<ratio>
C++11
<regex>
<stdexcept>
<string>
C++11
<system_error>
C++11
<tuple>
C++11
<type_traits>
C++11
<typeindex>
<typeinfo>
<utility>
<valarray>
<system_error>
类
C++11
error_category
C++11
error_code
C++11
error_condition
C++11
is_error_code_enum
C++11
is_error_condition_enum
C++11
system_error
枚举类
C++11
errc
函数
C++11
generic_category
C++11
make_error_code
C++11
make_error_condition
C++11
system_category
error_category
C++11
error_category::~error_category
C++11
error_category::error_category
成员函数
C++11
关系运算符 (error_category)
虚拟成员函数
C++11
error_category::default_error_condition
C++11
error_category::equivalent
C++11
error_category::message
C++11
error_category::name
参考
<system_error>
error_category
message
public pure virtual member function
<system_error>
std::
error_category
::message
virtual string message (int val) const = 0;
Error message
In derived classes, the function returns a
string
object with a message describing the error condition denoted by
val
.
In
error_category
, it is a pure virtual member function.
This function is called both by
error_code::message
and
error_condition::message
to obtain the corresponding message in the
category
. Therefore, numerical values used by custom
error codes
and
error conditions
should only match for a category if they describe the same error.
参数
val
标识错误条件的数值。
If the
error_category
object is the
generic_category
, this argument is equivalent to an
errno
value (see
errc
for a list of standard values).
返回值
A
string
object with the message.
示例
有关示例,请参见
error_category
。
另见
error_category::name
Return category name
(public pure virtual member function)