Author: anagappan
Date: 2006-09-26 02:46:32 -0400 (Tue, 26 Sep 2006)
New Revision: 65899
Modified:
trunk/mcs/class/System.Data/System.Data/ChangeLog
trunk/mcs/class/System.Data/System.Data/DataRow.cs
Log:
* DataRow.cs: Raise exception same as MS.NET. Thanks to
Hubert FONGARNAND <[EMAIL PROTECTED]> for
providing this patch.
Modified: trunk/mcs/class/System.Data/System.Data/ChangeLog
===================================================================
--- trunk/mcs/class/System.Data/System.Data/ChangeLog 2006-09-26 06:27:24 UTC
(rev 65898)
+++ trunk/mcs/class/System.Data/System.Data/ChangeLog 2006-09-26 06:46:32 UTC
(rev 65899)
@@ -1,3 +1,9 @@
+2006-09-26 Nagappan A <[EMAIL PROTECTED]>
+
+ * DataRow.cs: Raise exception same as MS.NET. Thanks to
+ Hubert FONGARNAND <[EMAIL PROTECTED]> for
+ providing this patch.
+
2006-09-07 Vladimir Krasnov <[EMAIL PROTECTED]>
* DataSet.cs: added 2.0 stubs to solve typed dataset porting issues
Modified: trunk/mcs/class/System.Data/System.Data/DataRow.cs
===================================================================
--- trunk/mcs/class/System.Data/System.Data/DataRow.cs 2006-09-26 06:27:24 UTC
(rev 65898)
+++ trunk/mcs/class/System.Data/System.Data/DataRow.cs 2006-09-26 06:46:32 UTC
(rev 65899)
@@ -141,8 +141,10 @@
get { return this[columnName, DataRowVersion.Default]; }
set {
int columnIndex = _table.Columns.IndexOf
(columnName);
- if (columnIndex == -1)
- throw new IndexOutOfRangeException ();
+ if (columnIndex == -1) {
+ throw new ArgumentException ("The
column " + columnName +
+ " does not
belong to the table : " + _table.TableName);
+ }
this[columnIndex] = value;
}
}
@@ -201,8 +203,10 @@
public object this[string columnName, DataRowVersion version] {
get {
int columnIndex = _table.Columns.IndexOf
(columnName);
- if (columnIndex == -1)
- throw new IndexOutOfRangeException ();
+ if (columnIndex == -1) {
+ throw new ArgumentException ("The
column " + columnName +
+ " does not
belong to the table : " + _table.TableName);
+ }
return this[columnIndex, version];
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches