Skip to content

Commit

Permalink
Improve can't find conpty.dll exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyriar committed Aug 5, 2024
1 parent 1247f91 commit 98d8566
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 98d8566

Please sign in to comment.