From 5ed134d740e908f7fd1d514c80793b4a227e01a9 Mon Sep 17 00:00:00 2001 From: sta Date: Mon, 15 Jun 2020 19:41:24 +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 3f78517f..a1f506c4 100644 --- a/websocket-sharp/Net/WebHeaderCollection.cs +++ b/websocket-sharp/Net/WebHeaderCollection.cs @@ -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.";