From 0c746bfcfaa5d9502b4f7e7f39f6fc07b1c777c8 Mon Sep 17 00:00:00 2001 From: sta Date: Wed, 29 Apr 2020 19:41:34 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/Net/WebHeaderCollection.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/websocket-sharp/Net/WebHeaderCollection.cs b/websocket-sharp/Net/WebHeaderCollection.cs index 5809e619..671fba07 100644 --- a/websocket-sharp/Net/WebHeaderCollection.cs +++ b/websocket-sharp/Net/WebHeaderCollection.cs @@ -785,8 +785,12 @@ namespace WebSocketSharp.Net private static int checkColonSeparated (string header) { var idx = header.IndexOf (':'); - if (idx == -1) - throw new ArgumentException ("No colon could be found.", "header"); + + if (idx == -1) { + var msg = "No colon could be found."; + + throw new ArgumentException (msg, "header"); + } return idx; }