From 98d85661719181ec65369e1ec04523fcbef0a00a Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Mon, 5 Aug 2024 08:21:32 -0700 Subject: [PATCH] Improve can't find conpty.dll exception message Part of microsoft/vscode#224488 --- src/win/conpty.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/win/conpty.cc b/src/win/conpty.cc index 20993d8c0..eeafd3c5c 100644 --- a/src/win/conpty.cc +++ b/src/win/conpty.cc @@ -179,7 +179,9 @@ HANDLE LoadConptyDll(const Napi::CallbackInfo& info, std::wstring conptyDllPath = currentDirStr + L"\\build\\Release\\conpty\\conpty.dll"; if (!path_util::file_exists(conptyDllPath)) { - throw errorWithCode(info, "Cannot find conpty.dll"); + std::wstring errorMessage = L"Cannot find conpty.dll at " + conptyDllPath; + std::string errorMessageStr(errorMessage.begin(), errorMessage.end()); + throw errorWithCode(info, errorMessageStr.c_str()); } return LoadLibraryW(conptyDllPath.c_str());