From 6b43d343d477892fdb0f14947e3386c596a86a3e Mon Sep 17 00:00:00 2001 From: Brett Saviano Date: Tue, 2 Jul 2024 10:35:51 -0400 Subject: [PATCH] Don't log error when attempting a debug attach in a non-Interoperability namespace --- src/extension.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index e2b4f23b..431260d1 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -941,12 +941,7 @@ export async function activate(context: vscode.ExtensionContext): Promise { .actionQuery("SELECT Job, ConfigName FROM Ens.Job_Enumerate() WHERE State = 'Alive'", []) .then((data) => Object.fromEntries(data.result.content.map((x) => [x.Job, x.ConfigName]))) .catch((error) => { - if ( - error && - error.errorText && - !error.errorText.includes("'ENS.JOB_ENUMERATE'(...)") && - error.errorText != "" - ) { + if (error?.errorText && error.errorText != "" && !error.errorText.includes("ENS.JOB_ENUMERATE")) { // Hide errors about Ens.Job_Enumerate procedure not existing because // the current namespace may not be Interoperability-enabled outputChannel.appendLine("\n" + error.errorText);