Skip to content

Commit f4bceff

Browse files
committed
Report language server exiting with unsaved changes as 'java.ls.error'.
Signed-off-by: Roland Grunberg <[email protected]>
1 parent 8e50fcb commit f4bceff

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/standardLanguageClient.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -343,16 +343,22 @@ export class StandardLanguageClient {
343343
} else if (e.name === Telemetry.LS_ERROR) {
344344
const tags = [];
345345
const exception: string = e?.properties.exception;
346+
const message: string = e?.properties.message;
346347
if (exception !== undefined) {
347348
if (exception.includes("dtree.ObjectNotFoundException")) {
348349
tags.push("dtree.ObjectNotFoundException");
349350
}
350-
351-
if (tags.length > 0) {
352-
e.properties['tags'] = tags;
353-
return Telemetry.sendTelemetry(Telemetry.LS_ERROR, e.properties);
351+
}
352+
if (message !== undefined) {
353+
if (message.includes("workspace exited with unsaved changes")) {
354+
tags.push("workspace-exited-unsaved-changes");
354355
}
355356
}
357+
358+
if (tags.length > 0) {
359+
e.properties['tags'] = tags;
360+
return Telemetry.sendTelemetry(Telemetry.LS_ERROR, e.properties);
361+
}
356362
}
357363
});
358364

0 commit comments

Comments
 (0)