mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 13:46:13 +00:00
Fixes #60458: Cannot read property 'message' of null
This commit is contained in:
parent
550a39facc
commit
25863af012
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue