From c97fd7d97a380e00c8b11c190b44a37e1e1a2702 Mon Sep 17 00:00:00 2001 From: sta Date: Sun, 3 May 2020 21:42:35 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/Net/WebHeaderCollection.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/websocket-sharp/Net/WebHeaderCollection.cs b/websocket-sharp/Net/WebHeaderCollection.cs index c2680e6b..65b92ca2 100644 --- a/websocket-sharp/Net/WebHeaderCollection.cs +++ b/websocket-sharp/Net/WebHeaderCollection.cs @@ -1138,8 +1138,11 @@ namespace WebSocketSharp.Net if (header == null) throw new ArgumentNullException ("header"); - if (header.Length == 0) - throw new ArgumentException ("An empty string.", "header"); + if (header.Length == 0) { + var msg = "An empty string."; + + throw new ArgumentException (msg, "header"); + } var idx = header.IndexOf (':');