We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4053dca commit 03066e4Copy full SHA for 03066e4
server/src/project/workspace.ts
@@ -48,7 +48,14 @@ export class Workspace {
48
this.activateDocument(document);
49
this._parseCancellationTokenSource?.cancel();
50
this._parseCancellationTokenSource = new CancellationTokenSource();
51
- await this._activeDocument?.parseAsync(this._parseCancellationTokenSource.token);
+
52
+ // Exceptions thrown by the parser should be ignored.
53
+ try {
54
+ await this._activeDocument?.parseAsync(this._parseCancellationTokenSource.token);
55
+ } catch (error) {
56
+ this.connection.console.log(`Parser error: ${error}`)
57
+ }
58
59
this._parseCancellationTokenSource = undefined;
60
this.connection.sendDiagnostics(this._activeDocument?.languageServerDiagnostics() ?? {uri: "", diagnostics: []});
61
}
0 commit comments