[Modify] Polish it

This commit is contained in:
sta 2019-11-09 17:31:15 +09:00
parent 9685acf4ab
commit 97862fd1a5

View File

@ -960,8 +960,10 @@ namespace WebSocketSharp.Net
if (cookie == null) if (cookie == null)
throw new ArgumentNullException ("cookie"); throw new ArgumentNullException ("cookie");
if (!canAddOrUpdate (cookie)) if (!canAddOrUpdate (cookie)) {
throw new ArgumentException ("Cannot be replaced.", "cookie"); var msg = "It cannot be replaced.";
throw new ArgumentException (msg, "cookie");
}
Cookies.Add (cookie); Cookies.Add (cookie);
} }