From dfbff9db5e8269f8ec66ed9e5e36762bd4634fac Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Tue, 5 Apr 2022 16:29:46 +0200 Subject: [PATCH] fix: report more detailed errors in shell.openExternal() on Windows --- shell/common/platform_util_win.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shell/common/platform_util_win.cc b/shell/common/platform_util_win.cc index eb1da7228470e..7df712d8f049e 100644 --- a/shell/common/platform_util_win.cc +++ b/shell/common/platform_util_win.cc @@ -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 ""; }