Re-throw `OperationCanceledException` for consistency?

Mostly to see if it breaks anything.
This commit is contained in:
Dean Herbert 2024-11-14 13:14:35 +09:00
parent 48212dfaeb
commit 2afd357901
No known key found for this signature in database
1 changed files with 3 additions and 1 deletions

View File

@ -139,6 +139,7 @@ await Parallel.ForEachAsync(tasks, notification.CancellationToken, async (task,
}
catch (OperationCanceledException)
{
throw;
}
catch (Exception e)
{
@ -531,7 +532,8 @@ protected virtual void PostImport(TModel model, Realm realm, ImportParameters pa
/// <param name="model">The new model proposed for import.</param>
/// <param name="realm">The current realm context.</param>
/// <returns>An existing model which matches the criteria to skip importing, else null.</returns>
protected TModel? CheckForExisting(TModel model, Realm realm) => string.IsNullOrEmpty(model.Hash) ? null : realm.All<TModel>().OrderBy(b => b.DeletePending).FirstOrDefault(b => b.Hash == model.Hash);
protected TModel? CheckForExisting(TModel model, Realm realm) =>
string.IsNullOrEmpty(model.Hash) ? null : realm.All<TModel>().OrderBy(b => b.DeletePending).FirstOrDefault(b => b.Hash == model.Hash);
/// <summary>
/// Whether import can be skipped after finding an existing import early in the process.