Merge pull request #2425 from github/aeisenberg/truncated-log-msg

Ensure full stack traces are included in log messages
This commit is contained in:
Andrew Eisenberg
2023-05-17 08:51:35 -07:00
committed by GitHub
3 changed files with 3 additions and 2 deletions

View File

@@ -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

View File

@@ -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;

View File

@@ -98,7 +98,7 @@ export async function showAndLogErrorMessage(
return internalShowAndLog(
dropLinesExceptInitial(message),
Window.showErrorMessage,
options,
{ fullMessage: message, ...options },
);
}