Skip to content

Commit

Permalink
Merge pull request microsoft#699 from microsoft/tyriar/conptydll_exce…
Browse files Browse the repository at this point in the history
…ption

Improve can't find conpty.dll exception message
  • Loading branch information
Tyriar authored Aug 5, 2024
2 parents 1247f91 + 98d8566 commit 485379c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/win/conpty.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 485379c

Please sign in to comment.