Skip to content

Commit eb7f92d

Browse files
committed
Update index.ts
1 parent 16ca59f commit eb7f92d

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/utils/index.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,12 +1027,11 @@ export async function replaceFile(uri: vscode.Uri, content: string | string[] |
10271027

10281028
/** Show the compilation failure error message if required. */
10291029
export function compileErrorMsg(error: any): void {
1030-
if (error instanceof Error && error.message.endsWith("Compile error")) {
1031-
// Don't log the generic placeholder error
1032-
handleError("", "Compilaton failed.");
1033-
} else {
1034-
handleError(error, "Compilaton failed.");
1035-
}
1030+
handleError(
1031+
// Don't log the generic placeholder error if that's all we have
1032+
error instanceof Error && error.message.endsWith("Compile error") ? "" : error,
1033+
"Compilaton failed."
1034+
);
10361035
}
10371036

10381037
/** Return a string containing the displayable form of `uri` */

0 commit comments

Comments
 (0)