表示所有异常的基类引发的报告低级别系统错误。
class system_error : public runtime_error {
public:
explicit system_error(error_code _Errcode, const string& _Message = "");
system_error(error_code _Errcode, const char *_Message);
system_error(error_code::value_type _Errval,
const error_category& _Errcat, const string& _Message);
system_error(error_code::value_type _Errval,
const error_category& _Errcat, const char *_Message);
const error_code& code() const throw();
const error_code& code() const throw();
};
备注
在选件类 异常 的 what 返回的值从 _Message 和类型构造 error_code 存储的对象( code 或 error_code(_Errval, _Errcat))。
成员函数 code 返回存储的 error_code 对象。
要求
标头: <system_error>
命名空间: std