Right now it errors in this function call:
|
var mostRecentFullBackup = MostRecentFullBackup(recentBackups); |
on this Linq expression:
|
return backups.Where(b => b.BackupType == BackupFileTools.BackupType.Full).OrderByDescending(d => d.CheckpointLsn) |
|
.First(); |
like this:
System.InvalidOperationException
Sequence contains no elements
We could fail this more gracefully, by adding a few checks and chaining it with a more informative Exception?
OR we can recover by just setting _orderedBackups = new List<BackupMetadata>()?
I'm not sure which would be the preferred choice.
If I had to choose, I would go for the more informative exception - then the users can handle this error any which way they want.
What do you guys think?
Alex Irion (@alexirion10) Ryan Clare (@Kaneraz)
Right now it errors in this function call:
AgDatabaseMove/src/BackupChain.cs
Line 28 in 683f409
on this Linq expression:
AgDatabaseMove/src/BackupChain.cs
Lines 61 to 62 in 683f409
like this:
We could fail this more gracefully, by adding a few checks and chaining it with a more informative Exception?
OR we can recover by just setting
_orderedBackups = new List<BackupMetadata>()?I'm not sure which would be the preferred choice.
If I had to choose, I would go for the more informative exception - then the users can handle this error any which way they want.
What do you guys think?
Alex Irion (@alexirion10) Ryan Clare (@Kaneraz)