diff options
author | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2005-03-12 00:11:27 +0300 |
---|---|---|
committer | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2005-03-12 00:11:27 +0300 |
commit | ec84c7c397d9e41455e40df199deb89f946535cf (patch) | |
tree | c63845697fc96602c65c9305e1e4dd50eb144fc7 /mcs/class/System.Data/System.Data.SqlClient | |
parent | 7f8418126e146713c346e01cc576518824917f89 (diff) |
2005-03-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* SqlException.cs: make it serialization-compatible with MS. Patch by
Aleksandar Dezelin. Closes bug #73596.
svn path=/trunk/mcs/; revision=41721
Diffstat (limited to 'mcs/class/System.Data/System.Data.SqlClient')
-rwxr-xr-x | mcs/class/System.Data/System.Data.SqlClient/ChangeLog | 5 | ||||
-rw-r--r-- | mcs/class/System.Data/System.Data.SqlClient/SqlException.cs | 9 |
2 files changed, 12 insertions, 2 deletions
diff --git a/mcs/class/System.Data/System.Data.SqlClient/ChangeLog b/mcs/class/System.Data/System.Data.SqlClient/ChangeLog index c0f8a64eae4..00ce4730983 100755 --- a/mcs/class/System.Data/System.Data.SqlClient/ChangeLog +++ b/mcs/class/System.Data/System.Data.SqlClient/ChangeLog @@ -1,3 +1,8 @@ +2005-03-11 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * SqlException.cs: make it serialization-compatible with MS. Patch by + Aleksandar Dezelin. Closes bug #73596. + 2005-03-08 Sureshkumar T <tsureshkumar@novell.com> * SqlDataReader.cs: Call base constructor with CommandBehavior diff --git a/mcs/class/System.Data/System.Data.SqlClient/SqlException.cs b/mcs/class/System.Data/System.Data.SqlClient/SqlException.cs index 91261c488c9..a491b9ba49a 100644 --- a/mcs/class/System.Data/System.Data.SqlClient/SqlException.cs +++ b/mcs/class/System.Data/System.Data.SqlClient/SqlException.cs @@ -46,7 +46,7 @@ namespace System.Data.SqlClient { { #region Fields - SqlErrorCollection errors; + private SqlErrorCollection errors; #endregion // Fields @@ -63,6 +63,11 @@ namespace System.Data.SqlClient { { errors = new SqlErrorCollection (theClass, lineNumber, message, number, procedure, server, source, state); } + + private SqlException(SerializationInfo si, StreamingContext sc) + { + errors = (SqlErrorCollection)si.GetValue("Errors", typeof(SqlErrorCollection)); + } #endregion // Constructors @@ -127,7 +132,7 @@ namespace System.Data.SqlClient { if (si == null) throw new ArgumentNullException ("si"); - si.AddValue ("errors", errors); + si.AddValue ("Errors", errors, typeof(SqlErrorCollection)); base.GetObjectData (si, context); } |