Skip to content

Commit

Permalink
W32: Add application name to error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamievlin committed Aug 24, 2024
1 parent f68e8a1 commit 97eb3b1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ int SystemWin32(const mem::vector<string>& command, int quiet, bool wait,
startInfo.hStdOutput= quiet >= 1 ? nulFileHandle.getHandle() : GetStdHandle(STD_OUTPUT_HANDLE);
startInfo.hStdError= quiet >= 2 ? nulFileHandle.getHandle() : GetStdHandle(STD_ERROR_HANDLE);

ostringstream errorMessage;
errorMessage << "Cannot open application " << application;
string const errorMessageOut=errorMessage.str();
w32::checkResult(CreateProcessA(
nullptr,
cmdlineStr.data(),
Expand All @@ -137,7 +140,7 @@ int SystemWin32(const mem::vector<string>& command, int quiet, bool wait,
nullptr, nullptr,
&startInfo,
&procInfo),
"Cannot open process");
errorMessageOut.c_str());
}
if (ppid)
{
Expand Down

0 comments on commit 97eb3b1

Please sign in to comment.