Propagate configuration errors from running queries
This commit is contained in:
parent
ee4ad8b9d6
commit
7e6aa4d65a
6 changed files with 16 additions and 12 deletions
|
|
@ -362,7 +362,7 @@ async function run() {
|
|||
startedAt,
|
||||
config,
|
||||
stats,
|
||||
error,
|
||||
error.error, // use the underlying error in case it is a configuration error
|
||||
trapCacheUploadTime,
|
||||
dbCreationTimings,
|
||||
didUploadTrapCaches,
|
||||
|
|
|
|||
|
|
@ -26,13 +26,13 @@ import * as util from "./util";
|
|||
import { BuildMode } from "./util";
|
||||
|
||||
export class CodeQLAnalysisError extends Error {
|
||||
queriesStatusReport: QueriesStatusReport;
|
||||
|
||||
constructor(queriesStatusReport: QueriesStatusReport, message: string) {
|
||||
constructor(
|
||||
public queriesStatusReport: QueriesStatusReport,
|
||||
public message: string,
|
||||
public error: Error,
|
||||
) {
|
||||
super(message);
|
||||
|
||||
this.name = "CodeQLAnalysisError";
|
||||
this.queriesStatusReport = queriesStatusReport;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -315,6 +315,7 @@ export async function runQueries(
|
|||
throw new CodeQLAnalysisError(
|
||||
statusReport,
|
||||
`Error running analysis for ${language}: ${util.wrapError(e).message}`,
|
||||
util.wrapError(e),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue