Przeglądaj źródła

2007-01-22 Miguel de Icaza <[email protected]>

	* Socket.cs: Move the throw new NotImplementedException ()
	elsewhere to prevent Moma reports.

svn path=/trunk/mcs/; revision=71458
Miguel de Icaza 19 lat temu
rodzic
commit
dd87eabb55

+ 5 - 0
mcs/class/System/System.Net.Sockets/ChangeLog

@@ -1,3 +1,8 @@
+2007-01-22  Miguel de Icaza  <[email protected]>
+
+	* Socket.cs: Move the throw new NotImplementedException ()
+	elsewhere to prevent Moma reports.
+
 2007-01-20  Dick Porter  <[email protected]>
 
 	* Socket.cs(SocketDefaults): Catch and ignore any SocketExceptions

+ 7 - 1
mcs/class/System/System.Net.Sockets/Socket.cs

@@ -1087,6 +1087,12 @@ namespace System.Net.Sockets
 				return(socket);
 			}
 		}
+
+		Exception GetNotImplemented (string msg)
+		{
+			return new NotImplementedException (msg);
+		}
+		
 #if !TARGET_JVM
 		// Returns the local endpoint details in addr and port
 		[MethodImplAttribute(MethodImplOptions.InternalCall)]
@@ -1114,7 +1120,7 @@ namespace System.Net.Sockets
 				} else if (sa.Family==AddressFamily.Unix && unixendpoint!=null) {
 					return((EndPoint)unixendpointtype.InvokeMember("Create", BindingFlags.InvokeMethod|BindingFlags.Instance|BindingFlags.Public, null, unixendpoint, new object[] {sa}));
 				} else {
-					throw new NotImplementedException(Locale.GetText ("No support for the {0} AddressFamily", sa.Family));
+					throw GetNotImplemented (Locale.GetText ("No support for the {0} AddressFamily", sa.Family));
 				}
 			}
 		}