From 25ed65150d369d4f4429a3fb1d26a58e92ec3de9 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 08:52:27 -0700 Subject: [PATCH] fix: report more detailed errors in shell.openExternal() on Windows (#33656) Co-authored-by: Milan Burda --- 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 c45093a559a62..d85fb8167cee0 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 ""; }