Merge pull request #197856 from microsoft/merogge/error-telemetry

ensure logged variable is defined
This commit is contained in:
Megan Rogge
2023-11-09 12:00:31 -08:00
committed by GitHub
+2 -1
View File
@@ -746,7 +746,8 @@ export class WorkerExtHostTask extends ExtHostTaskBase {
for (const task of value) {
this.checkDeprecation(task, handler);
if (!task.definition || !validTypes[task.definition.type]) {
this._logService.warn(`The task [${task.source}, ${task.name}] uses an undefined task type. The task will be ignored in the future.`);
const source = task.source ? task.source : 'No task source';
this._logService.warn(`The task [${source}, ${task.name}] uses an undefined task type. The task will be ignored in the future.`);
}
const taskDTO: tasks.ITaskDTO | undefined = TaskDTO.from(task, handler.extension);