[Modify] Polish it

This commit is contained in:
sta 2020-01-12 19:35:07 +09:00
parent bfbc8ec186
commit ef2d7ac99c

View File

@ -622,8 +622,10 @@ namespace WebSocketSharp.Net
return;
}
if (value.Length == 0)
throw new ArgumentException ("An empty string.", "value");
if (value.Length == 0) {
var msg = "An empty string.";
throw new ArgumentException (msg, "value");
}
Uri uri;
if (!Uri.TryCreate (value, UriKind.Absolute, out uri))