From 6ccd016f5648b0347943e2cae15ad89705c0fb62 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 10 Sep 2019 07:53:22 +0200 Subject: [PATCH] error handling :lipstick: --- src/vs/workbench/services/textfile/common/textFileService.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/services/textfile/common/textFileService.ts b/src/vs/workbench/services/textfile/common/textFileService.ts index 539de46fea9..a608d90765f 100644 --- a/src/vs/workbench/services/textfile/common/textFileService.ts +++ b/src/vs/workbench/services/textfile/common/textFileService.ts @@ -158,9 +158,8 @@ export abstract class TextFileService extends Disposable implements ITextFileSer // since a backup did not happen, we have to confirm for the dirty files now return this.confirmBeforeShutdown(); - }, errors => { - const firstError = errors[0]; - this.notificationService.error(nls.localize('files.backup.failSave', "Files that are dirty could not be written to the backup location (Error: {0}). Try saving your files first and then exit.", firstError.message)); + }, error => { + this.notificationService.error(nls.localize('files.backup.failSave', "Files that are dirty could not be written to the backup location (Error: {0}). Try saving your files first and then exit.", error.message)); return true; // veto, the backups failed });