From 6545fb96ba9d675f0ce75dfd3b605b8981cbad25 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 13 Jul 2020 12:20:15 +0200 Subject: [PATCH] re-use default NotImplementedError, make base type as implementing task service, https://github.com/microsoft/vscode/issues/101857 fyi @alexr00 --- src/vs/workbench/api/common/extHostTask.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/api/common/extHostTask.ts b/src/vs/workbench/api/common/extHostTask.ts index b108cf8da7e..6bf128644e9 100644 --- a/src/vs/workbench/api/common/extHostTask.ts +++ b/src/vs/workbench/api/common/extHostTask.ts @@ -26,6 +26,7 @@ import * as Platform from 'vs/base/common/platform'; import { ILogService } from 'vs/platform/log/common/log'; import { IExtHostApiDeprecationService } from 'vs/workbench/api/common/extHostApiDeprecationService'; import { USER_TASKS_GROUP_KEY } from 'vs/workbench/contrib/tasks/common/taskService'; +import { NotImplementedError } from 'vs/base/common/errors'; export interface IExtHostTask extends ExtHostTaskShape { @@ -370,7 +371,7 @@ export interface HandlerData { extension: IExtensionDescription; } -export abstract class ExtHostTaskBase implements ExtHostTaskShape { +export abstract class ExtHostTaskBase implements ExtHostTaskShape, IExtHostTask { readonly _serviceBrand: undefined; protected readonly _proxy: MainThreadTaskShape; @@ -714,7 +715,7 @@ export class WorkerExtHostTask extends ExtHostTaskBase { if (CustomExecutionDTO.is(dto.execution)) { await this.addCustomExecution(dto, task, false); } else { - throw new Error('Not implemented'); + throw new NotImplementedError(); } // Always get the task execution first to prevent timing issues when retrieving it later