[Mono-bugs] [Bug 79488][Nor] New - Bad exception rendering with DataRows

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Sep 25 09:46:13 EDT 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by informatique.internet at fiducial.fr.

http://bugzilla.ximian.com/show_bug.cgi?id=79488

--- shadow/79488	2006-09-25 09:46:13.000000000 -0400
+++ shadow/79488.tmp.32314	2006-09-25 09:46:13.000000000 -0400
@@ -0,0 +1,82 @@
+Bug#: 79488
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.Data
+AssignedTo: tsenganal at novell.com                            
+ReportedBy: informatique.internet at fiducial.fr               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Bad exception rendering with DataRows
+
+Description of Problem:
+There's some differences when dealing with DataRows and Exception between
+.NET and mono
+
+Steps to reproduce the problem:
+1. Try this program :
+
+// project created on 28/09/2005 at 10:43
+using System;
+using System.Data;
+
+class MainClass
+{
+	public static void Main(string[] args)
+	{
+		DataTable table=new DataTable();
+		table.Columns.Add("Essai");
+		DataRow row=table.NewRow();
+		row["Essai"]="ok";
+		row["Essai2"]="not ok";
+		table.Rows.Add(row);
+		Console.WriteLine(table.Rows.Count);
+	}
+	
+}
+2. This program should fail at line 13 when accessing the column "Essai2"
+that doesn't exist
+3. 
+
+Actual Results:
+On mono
+
+Unhandled Exception: System.IndexOutOfRangeException: Array index is out of
+range.
+  at System.Data.DataRow.set_Item (System.String columnName, System.Object
+value) [0x00027] in
+/home/hubert/mono/mcs/class/System.Data/System.Data/DataRow.cs:147 
+  at MainClass.Main (System.String[] args) [0x0002e] in
+/home/hubert/Projects/test/Main.cs:13 
+
+-> It's impossible to know the name of the incriminated column
+
+Expected Results:
+On MS.NET
+(In french)
+Exception non gérée : System.ArgumentException: La colonne 'Essai2'
+n'appartient
+ pas à la table .
+   at System.Data.DataRow.set_Item(String columnName, Object value)
+   at MainClass.Main(String[] args)
+
+(In english)
+Unhandled Exception System.ArgumentException: The column "Essai2" is not
+present in table .
+   at System.Data.DataRow.set_Item(String columnName, Object value)
+   at MainClass.Main(String[] args)
+
+How often does this happen? 
+always
+
+Additional Information:
+It can be useful to have these information in mono too (for debugging purpose)
+
+Thanks


More information about the mono-bugs mailing list