diff options
Diffstat (limited to 'src/System.Private.CoreLib/shared')
-rw-r--r-- | src/System.Private.CoreLib/shared/System/Collections/Generic/ArraySortHelper.cs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/System.Private.CoreLib/shared/System/Collections/Generic/ArraySortHelper.cs b/src/System.Private.CoreLib/shared/System/Collections/Generic/ArraySortHelper.cs index 03b986504..e1c232e84 100644 --- a/src/System.Private.CoreLib/shared/System/Collections/Generic/ArraySortHelper.cs +++ b/src/System.Private.CoreLib/shared/System/Collections/Generic/ArraySortHelper.cs @@ -14,6 +14,7 @@ ===========================================================*/ using System.Diagnostics; +using System.Threading; using System.Runtime.CompilerServices; namespace System.Collections.Generic @@ -68,6 +69,10 @@ namespace System.Collections.Generic { IntrospectiveSortUtilities.ThrowOrIgnoreBadComparer(comparer); } + catch (ThreadAbortException) + { + throw; + } catch (Exception e) { throw new InvalidOperationException(SR.InvalidOperation_IComparerFailed, e); @@ -85,6 +90,10 @@ namespace System.Collections.Generic return InternalBinarySearch(array, index, length, value, comparer); } + catch (ThreadAbortException) + { + throw; + } catch (Exception e) { throw new InvalidOperationException(SR.InvalidOperation_IComparerFailed, e); @@ -108,6 +117,10 @@ namespace System.Collections.Generic { IntrospectiveSortUtilities.ThrowOrIgnoreBadComparer(comparer); } + catch (ThreadAbortException) + { + throw; + } catch (Exception e) { throw new InvalidOperationException(SR.InvalidOperation_IComparerFailed, e); @@ -355,6 +368,10 @@ namespace System.Collections.Generic { IntrospectiveSortUtilities.ThrowOrIgnoreBadComparer(comparer); } + catch (ThreadAbortException) + { + throw; + } catch (Exception e) { throw new InvalidOperationException(SR.InvalidOperation_IComparerFailed, e); @@ -377,6 +394,10 @@ namespace System.Collections.Generic return ArraySortHelper<T>.InternalBinarySearch(array, index, length, value, comparer); } } + catch (ThreadAbortException) + { + throw; + } catch (Exception e) { throw new InvalidOperationException(SR.InvalidOperation_IComparerFailed, e); @@ -645,6 +666,10 @@ namespace System.Collections.Generic { IntrospectiveSortUtilities.ThrowOrIgnoreBadComparer(comparer); } + catch (ThreadAbortException) + { + throw; + } catch (Exception e) { throw new InvalidOperationException(SR.InvalidOperation_IComparerFailed, e); @@ -893,6 +918,10 @@ namespace System.Collections.Generic { IntrospectiveSortUtilities.ThrowOrIgnoreBadComparer(comparer); } + catch (ThreadAbortException) + { + throw; + } catch (Exception e) { throw new InvalidOperationException(SR.InvalidOperation_IComparerFailed, e); |