public void TryRemoveSelectedEntries() { try { if (!IsArchiveOpened) { return; } if (!IsArchiveSaveAllowed) { throw new InvalidOperationException("Archive opened in read-only mode."); } var entriesToDelete = Entries.Where(item => item.IsSelected).ToList(); foreach (var entry in entriesToDelete) { _epfArchive.RemoveEntry(entry.Name); } } catch (InvalidOperationException ex) { Status.Log.Warning($"Unable to remove any entries. {ex.Message}"); } catch (Exception ex) { Status.Log.Error($"Unhandled exception: {ex}"); } }