From 56921327553997bc7d25bfb9d5935df77e52f526 Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Fri, 3 Jun 2022 22:23:33 +1000 Subject: [PATCH] fix(lsp): handle get diagnostic errors better (#14776) --- cli/tsc/99_main_compiler.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cli/tsc/99_main_compiler.js b/cli/tsc/99_main_compiler.js index ac036f0822..c8dc56d5b9 100644 --- a/cli/tsc/99_main_compiler.js +++ b/cli/tsc/99_main_compiler.js @@ -760,7 +760,10 @@ delete Object.prototype.__proto__; } return respond(id, diagnosticMap); } catch (e) { - if (!(e instanceof OperationCanceledError)) { + if ( + !(e instanceof OperationCanceledError || + e instanceof ts.OperationCanceledException) + ) { if ("stack" in e) { error(e.stack); } else {