Fixes #60458: Cannot read property 'message' of null

This commit is contained in:
Dirk Baeumer 2018-10-15 12:32:11 +02:00
parent 550a39facc
commit 25863af012

View file

@ -1328,11 +1328,14 @@ class TaskService extends Disposable implements ITaskService {
};
let error = (error: any) => {
try {
if (Types.isString(error.message)) {
if (error && Types.isString(error.message)) {
this._outputChannel.append('Error: ');
this._outputChannel.append(error.message);
this._outputChannel.append('\n');
this.outputService.showChannel(this._outputChannel.id, true);
} else {
this._outputChannel.append('Unknown error received while collecting tasks from providers.\n');
this.outputService.showChannel(this._outputChannel.id, true);
}
} finally {
if (--counter === 0) {