Skip to content

Commit 97862fd

Browse files
committed
[Modify] Polish it
1 parent 9685acf commit 97862fd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

websocket-sharp/Net/HttpListenerResponse.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -960,8 +960,10 @@ public void SetCookie (Cookie cookie)
960960
if (cookie == null)
961961
throw new ArgumentNullException ("cookie");
962962

963-
if (!canAddOrUpdate (cookie))
964-
throw new ArgumentException ("Cannot be replaced.", "cookie");
963+
if (!canAddOrUpdate (cookie)) {
964+
var msg = "It cannot be replaced.";
965+
throw new ArgumentException (msg, "cookie");
966+
}
965967

966968
Cookies.Add (cookie);
967969
}

0 commit comments

Comments
 (0)