Add user error for gracefully running out of memory

As opposed to being killed by the JVM, which is a failure not a
user error.
This commit is contained in:
Henry Mercer 2024-05-08 13:21:10 +01:00
parent ec1179000d
commit 45fb58ab31
3 changed files with 9 additions and 1 deletions

4
lib/cli-errors.js generated
View file

@ -117,6 +117,7 @@ function ensureEndsInPeriod(text) {
var CliConfigErrorCategory;
(function (CliConfigErrorCategory) {
CliConfigErrorCategory["ExternalRepositoryCloneFailed"] = "ExternalRepositoryCloneFailed";
CliConfigErrorCategory["GracefulOutOfMemory"] = "GracefulOutOfMemory";
CliConfigErrorCategory["GradleBuildFailed"] = "GradleBuildFailed";
CliConfigErrorCategory["IncompatibleWithActionVersion"] = "IncompatibleWithActionVersion";
CliConfigErrorCategory["InitCalledTwice"] = "InitCalledTwice";
@ -141,6 +142,9 @@ exports.cliErrorsConfig = {
new RegExp("Failed to clone external Git repository"),
],
},
[CliConfigErrorCategory.GracefulOutOfMemory]: {
cliErrorMessageCandidates: [new RegExp("CodeQL is out of memory.")],
},
[CliConfigErrorCategory.GradleBuildFailed]: {
cliErrorMessageCandidates: [
new RegExp("[autobuild] FAILURE: Build failed with an exception."),