From 617659db6b9560d65f07863ec1e4ce3d62ca84c7 Mon Sep 17 00:00:00 2001 From: sta Date: Sun, 8 Mar 2020 22:13:30 +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 a81c9258..2b943019 100644 --- a/websocket-sharp/Net/WebHeaderCollection.cs +++ b/websocket-sharp/Net/WebHeaderCollection.cs @@ -842,8 +842,11 @@ namespace WebSocketSharp.Net throw new ArgumentOutOfRangeException ("value", msg); } - if (!IsHeaderValue (value)) - throw new ArgumentException ("Contains invalid characters.", "value"); + if (!IsHeaderValue (value)) { + var msg = "It contains an invalid character."; + + throw new ArgumentException (msg, "value"); + } return value; }