Skip to content

Commit cc76ca8

Browse files
Don't change compileAndRunQuery
1 parent 3316d17 commit cc76ca8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

extensions/ql-vscode/src/extension.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ import {
7373
showInformationMessageWithAction,
7474
tmpDir,
7575
} from "./helpers";
76-
import { assertNever, getErrorMessage } from "./pure/helpers-pure";
76+
import { asError, assertNever, getErrorMessage } from "./pure/helpers-pure";
7777
import { spawnIdeServer } from "./ide-server";
7878
import { ResultsView } from "./interface";
7979
import { WebviewReveal } from "./interface-utils";
@@ -771,7 +771,9 @@ async function activateWithInstalledDistribution(
771771
// Note we must update the query history view after showing results as the
772772
// display and sorting might depend on the number of results
773773
} catch (e) {
774-
item.failureReason = `Error running query: ${getErrorMessage(e)}`;
774+
const err = asError(e);
775+
err.message = `Error running query: ${err.message}`;
776+
item.failureReason = err.message;
775777
throw e;
776778
} finally {
777779
await qhm.refreshTreeView();

0 commit comments

Comments
 (0)