Catching unhandled exceptions when starting language server by LanguageClient #1307
Labels
feature-request
Request for new features or functionality
help wanted
Issues identified as good community contribution opportunities
Milestone
When starting a language server (in my case python), which fails, there are a few exceptions that cannot be caught:
Error: Pending response rejected since connection got disposed
Error: Client is not running and can't be stopped. It's current state is: starting
The problem is that VSCode for all unhandled errors creates an "unhandledError" telemetry event. For correct analysis of telemetry data, you must manually create an event that indicates a specific problem. In this case, for example, "serverStartFailed".
Yes, I can set
initializationFailedHandler
in theLanguageClientOptions
and create the necessary telemetry event in it. But VSCode will still create a duplicate "unhandledError" event, because the error is not caught.Another bewilderment is that the server's stderr output can only be received in the
outputChannel
. Why not pass it as an argument toinitializationFailedHandler
? Or create a corresponding attribute in theLanguageClient
class? To understand what happened to the user, I need to send all the information from theoutputChannel
to the telemetry server, including unnecessary information.It also looks strange to automatically try to stop a server that is not running, which leads to another error. And it also automatically sent to telemetry...
Thanks!
The text was updated successfully, but these errors were encountered: