提交 7d1affcf 编写于 作者: A Alex Ross

Throw useful error if task execution is undefined

https://github.com/microsoft/vscode/issues/109861
上级 5905725b
......@@ -705,6 +705,10 @@ export class WorkerExtHostTask extends ExtHostTaskBase {
}
public async executeTask(extension: IExtensionDescription, task: vscode.Task): Promise<vscode.TaskExecution> {
if (!task.execution) {
throw new Error('Tasks to execute must include an execution');
}
const dto = TaskDTO.from(task, extension);
if (dto === undefined) {
throw new Error('Task is not valid');
......
......@@ -50,6 +50,10 @@ export class ExtHostTask extends ExtHostTaskBase {
}
public async executeTask(extension: IExtensionDescription, task: vscode.Task): Promise<vscode.TaskExecution> {
if (!task.execution) {
throw new Error('Tasks to execute must include an execution');
}
const tTask = (task as types.Task);
// We have a preserved ID. So the task didn't change.
if (tTask._id !== undefined) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册