editors - log error when opening fails

This commit is contained in:
Benjamin Pasero 2021-05-27 16:47:15 +02:00
parent 61f3ac6e07
commit d2a0bfb286
No known key found for this signature in database
GPG key ID: E6380CC4C8219E65

View file

@ -1026,6 +1026,9 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
// Report error only if we are not told to ignore errors that occur from opening an editor
if (!isPromiseCanceledError(error) && (!options || !options.ignoreError)) {
// Always log the error to figure out what is going on
this.logService.error(error);
// Since it is more likely that errors fail to open when restoring them e.g.
// because files got deleted or moved meanwhile, we do not show any notifications
// if we are still restoring editors.
@ -1090,11 +1093,6 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
Event.once(handle.onDidClose)(() => actions.primary && dispose(actions.primary));
}
}
// Restoring: just log errors to console
else {
this.logService.error(error);
}
}
// Event