Author: alp
Date: 2005-03-31 09:13:44 -0500 (Thu, 31 Mar 2005)
New Revision: 42428
Modified:
trunk/mcs/class/corlib/System.Runtime.InteropServices/ChangeLog
trunk/mcs/class/corlib/System.Runtime.InteropServices/GCHandle.cs
Log:
2005-03-31 Alp Toker <[EMAIL PROTECTED]>
* GCHandle.cs: Clearer ArgumentException text in the case of a
null-valued IntPtr argument.
Modified: trunk/mcs/class/corlib/System.Runtime.InteropServices/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System.Runtime.InteropServices/ChangeLog
2005-03-31 13:55:21 UTC (rev 42427)
+++ trunk/mcs/class/corlib/System.Runtime.InteropServices/ChangeLog
2005-03-31 14:13:44 UTC (rev 42428)
@@ -1,3 +1,8 @@
+2005-03-31 Alp Toker <[EMAIL PROTECTED]>
+
+ * GCHandle.cs: Clearer ArgumentException text in the case of a
+ null-valued IntPtr argument.
+
2005-03-04 Kazuki Oikawa <[EMAIL PROTECTED]>
* _Exception.cs
Modified: trunk/mcs/class/corlib/System.Runtime.InteropServices/GCHandle.cs
===================================================================
--- trunk/mcs/class/corlib/System.Runtime.InteropServices/GCHandle.cs
2005-03-31 13:55:21 UTC (rev 42427)
+++ trunk/mcs/class/corlib/System.Runtime.InteropServices/GCHandle.cs
2005-03-31 14:13:44 UTC (rev 42428)
@@ -114,6 +114,8 @@
public static explicit operator GCHandle(IntPtr value)
{
+ if (value == IntPtr.Zero)
+ throw new ArgumentException ("GCHandle value
cannot be zero");
if (!CheckCurrentDomain ((int)value))
throw new ArgumentException ("GCHandle value
belongs to a different domain");
return new GCHandle (value);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches