Improve error categorizations
This commit is contained in:
parent
db40ac46b9
commit
1d367b0bec
24 changed files with 47 additions and 38 deletions
4
lib/codeql.js
generated
4
lib/codeql.js
generated
|
|
@ -161,7 +161,7 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV
|
|||
codeqlCmd += ".exe";
|
||||
}
|
||||
else if (process.platform !== "linux" && process.platform !== "darwin") {
|
||||
throw new Error(`Unsupported platform: ${process.platform}`);
|
||||
throw new util.UserError(`Unsupported platform: ${process.platform}`);
|
||||
}
|
||||
cachedCodeQL = await getCodeQLForCmd(codeqlCmd, checkVersion);
|
||||
return {
|
||||
|
|
@ -705,7 +705,7 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||
// CodeQL object is created.
|
||||
if (checkVersion &&
|
||||
!(await util.codeQlVersionAbove(codeql, CODEQL_MINIMUM_VERSION))) {
|
||||
throw new Error(`Expected a CodeQL CLI with version at least ${CODEQL_MINIMUM_VERSION} but got version ${(await codeql.getVersion()).version}`);
|
||||
throw new util.UserError(`Expected a CodeQL CLI with version at least ${CODEQL_MINIMUM_VERSION} but got version ${(await codeql.getVersion()).version}`);
|
||||
}
|
||||
else if (checkVersion &&
|
||||
process.env[environment_1.EnvVar.SUPPRESS_DEPRECATED_SOON_WARNING] !== "true" &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue