Consistently wrap errors
This commit is contained in:
parent
555b602b2f
commit
e5c2f32a9f
39 changed files with 145 additions and 122 deletions
3
lib/codeql.js
generated
3
lib/codeql.js
generated
|
|
@ -39,6 +39,7 @@ const shared_environment_1 = require("./shared-environment");
|
|||
const toolrunner_error_catcher_1 = require("./toolrunner-error-catcher");
|
||||
const trap_caching_1 = require("./trap-caching");
|
||||
const util = __importStar(require("./util"));
|
||||
const util_1 = require("./util");
|
||||
class CommandInvocationError extends Error {
|
||||
constructor(cmd, args, exitCode, error, output) {
|
||||
super(`Failure invoking ${cmd} with arguments ${args}.\n
|
||||
|
|
@ -143,7 +144,7 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV
|
|||
};
|
||||
}
|
||||
catch (e) {
|
||||
logger.error(e instanceof Error ? e : new Error(String(e)));
|
||||
logger.error((0, util_1.wrapError)(e).message);
|
||||
throw new Error("Unable to download and extract CodeQL CLI");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue