Skip to content

Commit 046bc13

Browse files
committed
Try generating evaluation log summary after failed query
When a local query fails (for example, if it is cancelled), it may still have an evaluation log. We weren't generating evaluation log summaries in these cases, so the options to view the summary text and to use the evaluation log viewer would not be available. This fixes it by also trying to generate the summary in the case of a failed query.
1 parent 226274c commit 046bc13

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

extensions/ql-vscode/src/local-queries/local-query-run.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,15 @@ export class LocalQueryRun {
9797
* Updates the UI in the case where query evaluation throws an exception.
9898
*/
9999
public async fail(err: Error): Promise<void> {
100+
const evalLogPaths = await this.summarizeEvalLog(
101+
QueryResultType.OTHER_ERROR,
102+
this.outputDir,
103+
this.logger,
104+
);
105+
if (evalLogPaths !== undefined) {
106+
this.queryInfo.setEvaluatorLogPaths(evalLogPaths);
107+
}
108+
100109
err.message = `Error running query: ${err.message}`;
101110
this.queryInfo.failureReason = err.message;
102111
await this.queryHistoryManager.refreshTreeView();

0 commit comments

Comments
 (0)