Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
diff options
context:
space:
mode:
authorCarlos Alberto Cortez <calberto.cortez@gmail.com>2010-01-22 02:43:48 +0300
committerCarlos Alberto Cortez <calberto.cortez@gmail.com>2010-01-22 02:43:48 +0300
commitffa7bf81b0a8f3b4530238e6f2b9ffb6452c2823 (patch)
tree1ab471b02640a2ccd9522bc833bbbaf461d94c87 /mcs
parent4215af6a71be9afa6629ef2937d22ca60f23fba4 (diff)
2010-01-21 Carlos Alberto Cortez <calberto.cortez@gmail.com>
* IPEndPoint.cs: When throwing an ArgumentException in Create() because of a mismatch in the address family, use a more informative message. Patch by Juho Vähä-Herttu<juhovh@iki.fi>. Fixes #505105. svn path=/trunk/mcs/; revision=150031
Diffstat (limited to 'mcs')
-rw-r--r--mcs/class/System/System.Net/ChangeLog7
-rw-r--r--mcs/class/System/System.Net/IPEndPoint.cs4
2 files changed, 10 insertions, 1 deletions
diff --git a/mcs/class/System/System.Net/ChangeLog b/mcs/class/System/System.Net/ChangeLog
index f8e25cbf0f4..728fc3e1477 100644
--- a/mcs/class/System/System.Net/ChangeLog
+++ b/mcs/class/System/System.Net/ChangeLog
@@ -1,3 +1,10 @@
+2010-01-21 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * IPEndPoint.cs: When throwing an ArgumentException in Create()
+ because of a mismatch in the address family, use a more informative
+ message. Patch by Juho Vähä-Herttu<juhovh@iki.fi>.
+ Fixes #505105.
+
2010-01-21 Sebastien Pouliot <sebastien@ximian.com>
* CookieContainer.cs: Fix to cloning and expiration. Patch
diff --git a/mcs/class/System/System.Net/IPEndPoint.cs b/mcs/class/System/System.Net/IPEndPoint.cs
index 27b816caef7..3aa2b182b88 100644
--- a/mcs/class/System/System.Net/IPEndPoint.cs
+++ b/mcs/class/System/System.Net/IPEndPoint.cs
@@ -92,7 +92,9 @@ namespace System.Net {
throw new ArgumentNullException ("socketAddress");
if (socketAddress.Family != AddressFamily)
- throw new ArgumentException ("socketAddress");
+ throw new ArgumentException ("The IPEndPoint was created using " + AddressFamily +
+ " AddressFamily but SocketAddress contains " + socketAddress.Family +
+ " instead, please use the same type.");
SocketAddress sockaddr = socketAddress;
int size =sockaddr.Size;