dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System Array.cs,1.18,1.19


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System Array.cs,1.18,1.19
Date: Mon, 14 Apr 2003 03:02:30 -0400

Update of /cvsroot/dotgnu-pnet/pnetlib/runtime/System
In directory subversions:/tmp/cvs-serv27020/runtime/System

Modified Files:
        Array.cs 
Log Message:


InnerSort: indicate IComparer failures with InvalidOperationException,
not ArgumentException.


Index: Array.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/runtime/System/Array.cs,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** Array.cs    14 Apr 2003 05:23:33 -0000      1.18
--- Array.cs    14 Apr 2003 07:02:28 -0000      1.19
***************
*** 1054,1064 ****
                        {
                                // Find two values to be swapped.
!                               while(comparer.Compare(keys.GetValue(i), pivot) 
< 0)
                                {
!                                       ++i;
                                }
!                               while(comparer.Compare(keys.GetValue(j), pivot) 
> 0)
                                {
!                                       --j;
                                }
                                if(i > j)
--- 1054,1071 ----
                        {
                                // Find two values to be swapped.
!                               try
                                {
!                                       
while(comparer.Compare(keys.GetValue(i), pivot) < 0)
!                                       {
!                                               ++i;
!                                       }
!                                       
while(comparer.Compare(keys.GetValue(j), pivot) > 0)
!                                       {
!                                               --j;
!                                       }
                                }
!                               catch(ArgumentException e)
                                {
!                                       throw new 
InvalidOperationException(e.Message);
                                }
                                if(i > j)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]