add main-side logging for save participants, #42013

This commit is contained in:
Johannes Rieken
2018-01-24 09:50:57 +01:00
parent 1d106e5afe
commit 4fde7a3773

View File

@@ -27,6 +27,7 @@ import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
import { IProgressService2, ProgressLocation } from 'vs/platform/progress/common/progress';
import { localize } from 'vs/nls';
import { isFalsyOrEmpty } from 'vs/base/common/arrays';
import { ILogService } from 'vs/platform/log/common/log';
export interface ISaveParticipantParticipant extends ISaveParticipant {
// progressMessage: string;
@@ -279,8 +280,9 @@ export class SaveParticipant implements ISaveParticipant {
constructor(
extHostContext: IExtHostContext,
@IInstantiationService instantiationService: IInstantiationService,
@IProgressService2 private _progressService: IProgressService2,
@IInstantiationService instantiationService: IInstantiationService
@ILogService private _logService: ILogService
) {
this._saveParticipants = [
instantiationService.createInstance(TrimWhitespaceParticipant),
@@ -303,7 +305,7 @@ export class SaveParticipant implements ISaveParticipant {
const promiseFactory = this._saveParticipants.map(p => () => {
return Promise.resolve(p.participate(model, env));
});
return sequence(promiseFactory).then(() => { });
return sequence(promiseFactory).then(() => { }, err => this._logService.error(err));
});
}
}