upd: [system] adjust the error_msg error print in Windows

This commit is contained in:
mutouyun 2022-08-13 18:28:19 +08:00
parent 9cbdcbd54f
commit bd198cb6e2

View File

@ -55,7 +55,7 @@ std::string error_msg(result_code code) noexcept {
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR)&lpErrText, (LPTSTR)&lpErrText,
0, NULL) == 0) { 0, NULL) == 0) {
log.error("FormatMessage fails. return = {}", ::GetLastError()); log.error("FormatMessage fails. return = {}", error_code());
return {}; return {};
} }
LIBIMP_UNUSED auto buf_guard = std::unique_ptr<std::remove_pointer_t<LPVOID>, LIBIMP_UNUSED auto buf_guard = std::unique_ptr<std::remove_pointer_t<LPVOID>,