[Modify] Do not throw

This commit is contained in:
sta 2019-05-28 20:28:44 +09:00
parent 9209f4c416
commit c0d777449c

View File

@ -613,16 +613,12 @@ namespace WebSocketSharp.Net
}
internal set {
if (!value.IsEnclosedIn ('"')) {
var msg = "It is not enclosed in double quotes.";
throw new ArgumentException (msg, "value");
}
if (!value.IsEnclosedIn ('"'))
return;
int[] ports;
if (!tryCreatePorts (value, out ports)) {
var msg = "It could not be parsed.";
throw new ArgumentException (msg, "value");
}
if (!tryCreatePorts (value, out ports))
return;
_port = value;
_ports = ports;