Improved system error message

This commit is contained in:
Bob Polis 2022-12-10 16:41:51 +01:00
parent 19b082b7a9
commit 1868e7deba

View File

@ -33,7 +33,7 @@ void __throw_if_min1(int x,
if (x == -1) {
error_code ec {errno, system_category()};
ostringstream ec_str;
ec_str << "system error " << ec.value() << ": " << ec.message();
ec_str << "system error " << ec.value();
string msg {combine_message_elements(file, line, message, ec_str.str().c_str())};
throw system_error {ec, msg};
}