From 04643269364f229e8a4f67fd299f3a71cf74d7ad Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 12 Jul 2023 16:10:53 -0700 Subject: catch error at top level when activating extension --- extension/src/extension.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'extension/src/extension.ts') diff --git a/extension/src/extension.ts b/extension/src/extension.ts index 1f9f7914..6959ec05 100644 --- a/extension/src/extension.ts +++ b/extension/src/extension.ts @@ -3,14 +3,17 @@ */ import * as vscode from "vscode"; -import { - isPythonEnvSetup, - startContinuePythonServer, -} from "./activation/environmentSetup"; async function dynamicImportAndActivate(context: vscode.ExtensionContext) { const { activateExtension } = await import("./activation/activate"); - await activateExtension(context); + try { + await activateExtension(context); + } catch (e) { + console.log("Error activating extension: ", e); + vscode.window.showInformationMessage( + "Error activating the Continue extension." + ); + } } export function activate(context: vscode.ExtensionContext) { -- cgit v1.2.3-70-g09d2