8000 fix: avoid triggering unhandled exception when tsserver crashes by rchl · Pull Request #805 · typescript-language-server/typescript-language-server · GitHub
[go: up one dir, main page]

Skip to content

fix: avoid triggering unhandled exception when tsserver crashes #805

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 14, 2023

Conversation

rchl
Copy link
Member
@rchl rchl commented Nov 14, 2023

Errors during tsserver request handling were triggering an unhandled exception and subsequently cause the language server process to exit.

Make sure that the promise that is "forked" is also catching exception so that exceptions are caught. The tsserver is able to keep running on error so we can keep running also.

It seems like in vscode the extension process has global handler for unhandled exceptions so even though it doesn't use catch on that promise, it still catches the exception and doesn't crash.

Resolves #803 (kind of)

Copy link
Contributor

size-limit report 📦

Path Size
lib/cli.mjs 782.29 KB (+0.01% 🔺)

@rchl rchl changed the title fix: avoid triggering unhandled exception when tsserver request crashes fix: avoid triggering unhandled exception when tsserver crashes Nov 14, 2023
@rchl rchl merged commit d537b08 into master Nov 14, 2023
@rchl rchl deleted the fix/unhandled-error branch November 14, 2023 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Server error "Could not find source file" on opening second file in a project with large amount of code
1 participant
0