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

This commit is contained in:
Milan Burda 2022-04-07 20:07:39 +02:00 committed by GitHub
parent 7fb1c8faad
commit 4d4682c0e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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