@@ -52,6 +52,7 @@ import { withNullAsUndefined } from 'vs/base/common/types';
5252import { URI } from 'vs/base/common/uri' ;
5353import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity' ;
5454import { isLinux , isNative , isWindows } from 'vs/base/common/platform' ;
55+ import { ILogService } from 'vs/platform/log/common/log' ;
5556
5657export class EditorGroupView extends Themable implements IEditorGroupView {
5758
@@ -145,7 +146,8 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
145146 @IFileDialogService private readonly fileDialogService : IFileDialogService ,
146147 @IEditorService private readonly editorService : EditorServiceImpl ,
147148 @IFilesConfigurationService private readonly filesConfigurationService : IFilesConfigurationService ,
148- @IUriIdentityService private readonly uriIdentityService : IUriIdentityService
149+ @IUriIdentityService private readonly uriIdentityService : IUriIdentityService ,
150+ @ILogService private readonly logService : ILogService
149151 ) {
150152 super ( themeService ) ;
151153
@@ -1600,10 +1602,13 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
16001602
16011603 return editor . isDirty ( ) ; // veto if still dirty
16021604 } catch ( error ) {
1605+ this . logService . error ( error ) ;
1606+
16031607 // if that fails, since we are about to close the editor, we accept that
16041608 // the editor cannot be reverted and instead do a soft revert that just
16051609 // enables us to close the editor. With this, a user can always close a
16061610 // dirty editor even when reverting fails.
1611+
16071612 await editor . revert ( this . id , { soft : true } ) ;
16081613
16091614 return editor . isDirty ( ) ; // veto if still dirty
0 commit comments