mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 11:10:48 +00:00
Throw useful error if task execution is undefined
https://github.com/microsoft/vscode/issues/109861
This commit is contained in:
parent
5905725b5c
commit
7d1affcf90
2 changed files with 8 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue