From 7efd75972d72b5b2101ce2af9c0e646b0de6f821 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Thu, 19 Sep 2024 02:03:29 +0200 Subject: [PATCH] Improve error message when `OS.execute()` fails on Windows This takes the error message from 4.x and backports it to 3.x. --- platform/windows/os_windows.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 251c5bcc8e5c..bea3c643716c 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -2978,7 +2978,7 @@ Error OS_Windows::execute(const String &p_path, const List &p_arguments, CloseHandle(pipe[0]); // Cleanup pipe handles. CloseHandle(pipe[1]); } - ERR_FAIL_COND_V(ret == 0, ERR_CANT_FORK); + ERR_FAIL_COND_V_MSG(ret == 0, ERR_CANT_FORK, "Could not create child process: " + String(modstr.ptr())); if (p_blocking) { if (r_pipe) {