diff --git a/extensions/ql-vscode/CHANGELOG.md b/extensions/ql-vscode/CHANGELOG.md index 58e63b143b0..696c9924b6b 100644 --- a/extensions/ql-vscode/CHANGELOG.md +++ b/extensions/ql-vscode/CHANGELOG.md @@ -3,6 +3,7 @@ ## [UNRELEASED] - Add settings `codeQL.variantAnalysis.defaultResultsFilter` and `codeQL.variantAnalysis.defaultResultsSort` for configuring how variant analysis results are filtered and sorted in the results view. The default is to show all repositories, and to sort by the number of results. [#2392](https://github.com/github/vscode-codeql/pull/2392) +- Fix bug to ensure error messages have complete stack trace in message logs. [#2425](https://github.com/github/vscode-codeql/pull/2425) - Fix bug where the `CodeQL: Compare Query` command did not work for comparing quick-eval queries. [#2422](https://github.com/github/vscode-codeql/pull/2422) ## 1.8.4 - 3 May 2023 diff --git a/extensions/ql-vscode/src/common/vscode/commands.ts b/extensions/ql-vscode/src/common/vscode/commands.ts index dfd765e177f..27f8455e56b 100644 --- a/extensions/ql-vscode/src/common/vscode/commands.ts +++ b/extensions/ql-vscode/src/common/vscode/commands.ts @@ -49,7 +49,6 @@ export function registerCommandWithErrorHandling( const errorMessage = redactableError(error)`${ getErrorMessage(e) || e } (${commandId})`; - const errorStack = getErrorStack(e); if (e instanceof UserCancellationException) { // User has cancelled this action manually if (e.silent) { @@ -61,6 +60,7 @@ export function registerCommandWithErrorHandling( } } else { // Include the full stack in the error log only. + const errorStack = getErrorStack(e); const fullMessage = errorStack ? `${errorMessage.fullMessage}\n${errorStack}` : errorMessage.fullMessage; diff --git a/extensions/ql-vscode/src/helpers.ts b/extensions/ql-vscode/src/helpers.ts index e7e33f20612..d4e8a9a8ca3 100644 --- a/extensions/ql-vscode/src/helpers.ts +++ b/extensions/ql-vscode/src/helpers.ts @@ -98,7 +98,7 @@ export async function showAndLogErrorMessage( return internalShowAndLog( dropLinesExceptInitial(message), Window.showErrorMessage, - options, + { fullMessage: message, ...options }, ); }