Browse Source

Merge pull request #97171 from Calinou/os-execute-windows-improve-cant-fork-error-message

[3.x] Improve error message when `OS.execute()` fails on Windows
lawnjelly 11 tháng trước cách đây
mục cha
commit
553030b599
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      platform/windows/os_windows.cpp

+ 1 - 1
platform/windows/os_windows.cpp

@@ -2978,7 +2978,7 @@ Error OS_Windows::execute(const String &p_path, const List<String> &p_arguments,
 		CloseHandle(pipe[0]); // Cleanup pipe handles.
 		CloseHandle(pipe[0]); // Cleanup pipe handles.
 		CloseHandle(pipe[1]);
 		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 (p_blocking) {
 		if (r_pipe) {
 		if (r_pipe) {