Improved system error message
This commit is contained in:
parent
19b082b7a9
commit
1868e7deba
@ -33,7 +33,7 @@ void __throw_if_min1(int x,
|
|||||||
if (x == -1) {
|
if (x == -1) {
|
||||||
error_code ec {errno, system_category()};
|
error_code ec {errno, system_category()};
|
||||||
ostringstream ec_str;
|
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())};
|
string msg {combine_message_elements(file, line, message, ec_str.str().c_str())};
|
||||||
throw system_error {ec, msg};
|
throw system_error {ec, msg};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user