Skip to content

Commit 2df0f18

Browse files
committed
Remove try/catch
1 parent fe240b4 commit 2df0f18

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

Microsoft.Toolkit.Uwp.UI/AdvancedCollectionView/AdvancedCollectionView.cs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -392,18 +392,11 @@ int IComparer<object>.Compare(object x, object y)
392392
cy = pi.GetValue(y);
393393
}
394394

395-
try
396-
{
397-
var cmp = sd.Comparer.Compare(cx, cy);
395+
var cmp = sd.Comparer.Compare(cx, cy);
398396

399-
if (cmp != 0)
400-
{
401-
return sd.Direction == SortDirection.Ascending ? +cmp : -cmp;
402-
}
403-
}
404-
catch
397+
if (cmp != 0)
405398
{
406-
// fail silently
399+
return sd.Direction == SortDirection.Ascending ? +cmp : -cmp;
407400
}
408401
}
409402

0 commit comments

Comments
 (0)