Skip to content

Commit 2162e7a

Browse files
authored
fix: export jar doesn't report error when grammatical error exists (#468)
1 parent 32ed473 commit 2162e7a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/build.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ async function handleBuildFailure(operationId: string, err: any): Promise<boolea
3636
});
3737
setErrorCode(error, Number(err));
3838
sendOperationError(operationId, "build", error);
39-
if (err === Jdtls.CompileWorkspaceStatus.Witherror || err === Jdtls.CompileWorkspaceStatus.Failed) {
39+
// Workaround: Since VS Code 1.53, the contributed command would no longer throw exact error message when an error occurs.
40+
// This change breaks the existing build error reporting, so we make a workaround here.
41+
// Related issue: https://github.com/microsoft/vscode/issues/116932
42+
if (err instanceof Error || err === Jdtls.CompileWorkspaceStatus.Witherror || err === Jdtls.CompileWorkspaceStatus.Failed) {
4043
if (checkErrorsReportedByJavaExtension()) {
4144
commands.executeCommand("workbench.actions.view.problems");
4245
}

0 commit comments

Comments
 (0)