[Modify] Polish it

This commit is contained in:
sta 2020-05-03 21:42:35 +09:00
parent 26e9edddf2
commit c97fd7d97a

View File

@ -1138,8 +1138,11 @@ namespace WebSocketSharp.Net
if (header == null) if (header == null)
throw new ArgumentNullException ("header"); throw new ArgumentNullException ("header");
if (header.Length == 0) if (header.Length == 0) {
throw new ArgumentException ("An empty string.", "header"); var msg = "An empty string.";
throw new ArgumentException (msg, "header");
}
var idx = header.IndexOf (':'); var idx = header.IndexOf (':');