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

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

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 "";
}