Author: suresh
Date: 2005-07-14 08:53:20 -0400 (Thu, 14 Jul 2005)
New Revision: 47303
Modified:
trunk/mcs/class/System.Data/System.Data/ChangeLog
trunk/mcs/class/System.Data/System.Data/DataView.cs
Log:
* DataView.cs: Patch from Marc Haisenko to throw descriptive error
message when accessing Item, with invalid index.
2005-07-14 Sureshkumar T <[EMAIL PROTECTED]>
Modified: trunk/mcs/class/System.Data/System.Data/ChangeLog
===================================================================
--- trunk/mcs/class/System.Data/System.Data/ChangeLog 2005-07-14 12:43:03 UTC
(rev 47302)
+++ trunk/mcs/class/System.Data/System.Data/ChangeLog 2005-07-14 12:53:20 UTC
(rev 47303)
@@ -1,5 +1,10 @@
2005-07-14 Sureshkumar T <[EMAIL PROTECTED]>
+ * DataView.cs: Patch from Marc Haisenko to throw descriptive error
+ message when accessing Item, with invalid index.
+
+2005-07-14 Sureshkumar T <[EMAIL PROTECTED]>
+
reapplied patch from Marc Haisenko.
* DataView.cs: Patch from Marc Haisenko that ensures that rowCache
is never null.
Modified: trunk/mcs/class/System.Data/System.Data/DataView.cs
===================================================================
--- trunk/mcs/class/System.Data/System.Data/DataView.cs 2005-07-14 12:43:03 UTC
(rev 47302)
+++ trunk/mcs/class/System.Data/System.Data/DataView.cs 2005-07-14 12:53:20 UTC
(rev 47303)
@@ -197,6 +197,9 @@
public DataRowView this[int recordIndex] {
[MonoTODO]
get {
+ if (recordIndex > rowCache.Length)
+ throw new IndexOutOfRangeException
("There is no row at " +
+
"position: " + recordIndex + ".");
return rowCache [recordIndex];
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches