Also log error when a fatal error happens

This commit is contained in:
Matt Bierner 2019-12-06 11:59:30 -08:00
parent cabcace4b5
commit 35587bec93

View file

@ -716,6 +716,9 @@ export default class TypeScriptServiceClient extends Disposable implements IType
*/
this.logTelemetry('fatalError', { command, ...(error instanceof TypeScriptServerError ? error.telemetry : {}) });
console.error(`A non-recoverable error occured while executing tsserver command: ${command}`);
if (error instanceof TypeScriptServerError && error.serverErrorText) {
console.error(error.serverErrorText);
}
if (this.serverState.type === ServerState.Type.Running) {
this.info('Killing TS Server');