Don't show notification after local query cancellation (#3489)
* Don't show notification after local query cancellation * Update CHANGELOG
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
## [UNRELEASED]
|
||||
|
||||
- Don't show notification after local query cancellation. [#3489](https://github.com/github/vscode-codeql/pull/3489)
|
||||
- Databases created from [CodeQL test cases](https://docs.github.com/en/code-security/codeql-cli/using-the-advanced-functionality-of-the-codeql-cli/testing-custom-queries) are now copied into a shared VS Code storage location. This avoids a bug where re-running test cases would fail if the test's database is already imported into the workspace. [#3433](https://github.com/github/vscode-codeql/pull/3433)
|
||||
|
||||
## 1.12.3 - 29 February 2024
|
||||
|
||||
@@ -2,7 +2,10 @@ import type {
|
||||
ProgressCallback,
|
||||
ProgressUpdate,
|
||||
} from "../common/vscode/progress";
|
||||
import { withProgress } from "../common/vscode/progress";
|
||||
import {
|
||||
UserCancellationException,
|
||||
withProgress,
|
||||
} from "../common/vscode/progress";
|
||||
import type { CancellationToken, Range, TabInputText } from "vscode";
|
||||
import { CancellationTokenSource, Uri, window } from "vscode";
|
||||
import {
|
||||
@@ -492,7 +495,12 @@ export class LocalQueries extends DisposableObject {
|
||||
// to unify both error handling paths.
|
||||
const err = asError(e);
|
||||
await localQueryRun.fail(err);
|
||||
throw e;
|
||||
|
||||
if (token.isCancellationRequested) {
|
||||
throw new UserCancellationException(err.message, true);
|
||||
} else {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
source.dispose();
|
||||
|
||||
Reference in New Issue
Block a user