Refactoring: Simplify retrieving error message
This commit is contained in:
parent
bbd7c801a0
commit
dd7307d603
54 changed files with 106 additions and 89 deletions
4
lib/codeql.js
generated
4
lib/codeql.js
generated
|
|
@ -142,7 +142,7 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV
|
|||
};
|
||||
}
|
||||
catch (e) {
|
||||
throw new Error(`Unable to download and extract CodeQL CLI: ${(0, util_1.wrapError)(e).message}`);
|
||||
throw new Error(`Unable to download and extract CodeQL CLI: ${(0, util_1.getErrorMessage)(e)}`);
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
|
@ -362,7 +362,7 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||
const ErrorConstructor = e instanceof util.ConfigurationError
|
||||
? util.ConfigurationError
|
||||
: Error;
|
||||
throw new ErrorConstructor(`${prefix} ${util.wrapError(e).message}`);
|
||||
throw new ErrorConstructor(`${prefix} ${(0, util_1.getErrorMessage)(e)}`);
|
||||
}
|
||||
else {
|
||||
throw e;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue