From 97eb3b164a04c93ebecc5a77ca24d5e83d121da7 Mon Sep 17 00:00:00 2001 From: Supakorn 'Jamie' Rassameemasmuang Date: Sat, 24 Aug 2024 13:07:38 -0600 Subject: [PATCH] W32: Add application name to error message. --- util.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util.cc b/util.cc index 76c4eb76f..16d6069a8 100644 --- a/util.cc +++ b/util.cc @@ -129,6 +129,9 @@ int SystemWin32(const mem::vector& 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(), @@ -137,7 +140,7 @@ int SystemWin32(const mem::vector& command, int quiet, bool wait, nullptr, nullptr, &startInfo, &procInfo), - "Cannot open process"); + errorMessageOut.c_str()); } if (ppid) {