[Modify] Polish it

This commit is contained in:
sta 2020-06-15 19:41:24 +09:00
parent 4ad02488ae
commit 5ed134d740

View File

@ -801,8 +801,11 @@ namespace WebSocketSharp.Net
name = name.Trim ();
if (name.Length == 0)
throw new ArgumentException ("A string of spaces.", "name");
if (name.Length == 0) {
var msg = "The name is a string of spaces.";
throw new ArgumentException (msg, "name");
}
if (!name.IsToken ()) {
var msg = "It contains an invalid character.";