From c0d777449c498972092396e688fa4f0734951b6a Mon Sep 17 00:00:00 2001 From: sta Date: Tue, 28 May 2019 20:28:44 +0900 Subject: [PATCH] [Modify] Do not throw --- websocket-sharp/Net/Cookie.cs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/websocket-sharp/Net/Cookie.cs b/websocket-sharp/Net/Cookie.cs index 57d11996..7e0975df 100644 --- a/websocket-sharp/Net/Cookie.cs +++ b/websocket-sharp/Net/Cookie.cs @@ -613,16 +613,12 @@ namespace WebSocketSharp.Net } internal set { - if (!value.IsEnclosedIn ('"')) { - var msg = "It is not enclosed in double quotes."; - throw new ArgumentException (msg, "value"); - } + if (!value.IsEnclosedIn ('"')) + return; int[] ports; - if (!tryCreatePorts (value, out ports)) { - var msg = "It could not be parsed."; - throw new ArgumentException (msg, "value"); - } + if (!tryCreatePorts (value, out ports)) + return; _port = value; _ports = ports;