From 716b141493b425806960a8cefa5ef21a233eeae3 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 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 ""; }