summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2018-10-03 13:31:02 (GMT)
committerBen Boeckel <mathstuf@gmail.com>2018-11-09 15:51:17 (GMT)
commit1463fdc0f73136aca4869be9ad577d08528b19c4 (patch)
tree8d3d5df4cc1faead978f73279542ee984d5e11e1
parente2aa04fdef84652492f7cd11ce9f4d971dd7a3c3 (diff)
downloadNinja-1463fdc0f73136aca4869be9ad577d08528b19c4.zip
Ninja-1463fdc0f73136aca4869be9ad577d08528b19c4.tar.gz
Ninja-1463fdc0f73136aca4869be9ad577d08528b19c4.tar.bz2
subprocess-win32: add hint on ERROR_INVALID_PARAMETER
This is generally associated with the command line being too long. Give a hint to this case in the error message.
-rw-r--r--src/subprocess-win32.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/subprocess-win32.cc b/src/subprocess-win32.cc
index 5982b06..a4a7669 100644
--- a/src/subprocess-win32.cc
+++ b/src/subprocess-win32.cc
@@ -124,6 +124,10 @@ bool Subprocess::Start(SubprocessSet* set, const string& command) {
buf_ = "CreateProcess failed: The system cannot find the file "
"specified.\n";
return true;
+ } else if (error == ERROR_INVALID_PARAMETER) {
+ // This generally means that the command line was too long. Give extra
+ // context for this case.
+ Win32Fatal("CreateProcess", "is the command line too long?");
} else {
Win32Fatal("CreateProcess"); // pass all other errors to Win32Fatal
}