From 1b4061e85c04373665aec4e6343a15942f24b7a8 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 14 Jan 2025 12:41:30 +0100 Subject: [PATCH] tasks - stop spam from cancellation --- .../contrib/tasks/browser/abstractTaskService.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts b/src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts index 88792098d83e2..2b00a6a1f0547 100644 --- a/src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts +++ b/src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts @@ -83,6 +83,7 @@ import { IPaneCompositePartService } from '../../../services/panecomposite/brows import { IPathService } from '../../../services/path/common/pathService.js'; import { IPreferencesService } from '../../../services/preferences/common/preferences.js'; import { IRemoteAgentService } from '../../../services/remote/common/remoteAgentService.js'; +import { isCancellationError } from '../../../../base/common/errors.js'; const QUICKOPEN_HISTORY_LIMIT_CONFIG = 'task.quickOpen.history'; const PROBLEM_MATCHER_NEVER_CONFIG = 'task.problemMatchers.neverPrompt'; @@ -2055,12 +2056,14 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer }; const error = (error: any) => { try { - if (error && Types.isString(error.message)) { - this._log(`Error: ${error.message}\n`); - this._showOutput(); - } else { - this._log('Unknown error received while collecting tasks from providers.'); - this._showOutput(); + if (!isCancellationError(error)) { + if (error && Types.isString(error.message)) { + this._log(`Error: ${error.message}\n`); + this._showOutput(); + } else { + this._log('Unknown error received while collecting tasks from providers.'); + this._showOutput(); + } } } finally { if (--counter === 0) {