public member function
<system_error>

std::system_error::system_error

(1)
system_error (error_code ec, const string& what_arg);
(2)
system_error (error_code ec, const char* what_arg);
(3)
system_error (error_code ec);
(4)
system_error (int val, const error_category& cat, const string& what_arg);
(5)
system_error (int val, const error_category& cat, const char* what_arg);
(6)
system_error (int val, const error_category& cat);
構造 system_error
構造一個 system_error 異常物件,帶有 錯誤碼 ec (或使用 valcat 構造的 錯誤碼)。

如果指定了 what_arg,它將被合併到 system_error::what 返回的字串中,這可能包含額外的由庫實現決定的資訊。

引數

ec
一個 error_code 物件。
what_arg
合併到成員 what 返回的字串中的訊息。
val
一個用於標識錯誤碼的數值。
cat
error_category 物件的引用。

另見