fix: report more detailed errors in shell.openExternal() on Windows (#33657)

Co-authored-by: Milan Burda <milan.burda@gmail.com>
This commit is contained in:
trop[bot]
2022-04-11 11:59:56 -07:00
committed by GitHub
parent c163154cc9
commit 9ca00c6afe

View File

@@ -251,7 +251,8 @@ std::string OpenExternalOnWorkerThread(
ShellExecuteW(nullptr, L"open", escaped_url.c_str(), nullptr,
working_dir.empty() ? nullptr : working_dir.c_str(),
SW_SHOWNORMAL)) <= 32) {
return "Failed to open";
return "Failed to open: " +
logging::SystemErrorCodeToString(logging::GetLastSystemErrorCode());
}
return "";
}