watcher - fix unhandled rejection (fix #137416)

This commit is contained in:
Benjamin Pasero 2021-11-18 19:38:27 +01:00 committed by deepak1556
parent ce3e969b04
commit 87b312de64

View file

@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import { ThrottledDelayer } from 'vs/base/common/async';
import { onUnexpectedError } from 'vs/base/common/errors';
import { Disposable } from 'vs/base/common/lifecycle';
import { basename, join } from 'vs/base/common/path';
import { realpath } from 'vs/base/node/extpath';
@ -109,7 +110,7 @@ export class FileWatcher extends Disposable {
if (coalescedFileChanges.length > 0) {
this.onDidFilesChange(coalescedFileChanges);
}
});
}).catch(error => onUnexpectedError(error));
}
private onError(error: string): void {