Address comments

This commit is contained in:
Arthur Baars 2021-05-24 11:00:02 +02:00
parent 4f51b8c47e
commit 44c6b33642
3 changed files with 25 additions and 5 deletions

View file

@ -674,7 +674,13 @@ function getCodeQLForCmd(cmd: string): CodeQL {
},
}).exec();
return JSON.parse(output);
try {
return JSON.parse(output);
} catch (e) {
throw new Error(
`Unexpected output from codeql resolve languages: ${e}`
);
}
},
async resolveQueries(
queries: string[],
@ -699,7 +705,11 @@ function getCodeQLForCmd(cmd: string): CodeQL {
},
}).exec();
return JSON.parse(output);
try {
return JSON.parse(output);
} catch (e) {
throw new Error(`Unexpected output from codeql resolve queries: ${e}`);
}
},
async databaseAnalyze(
databasePath: string,