From 7059a70cdb7fe7e46a301106a3c0cad913b175c4 Mon Sep 17 00:00:00 2001 From: sta Date: Mon, 11 Feb 2019 22:46:41 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/Net/Cookie.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/websocket-sharp/Net/Cookie.cs b/websocket-sharp/Net/Cookie.cs index 41d5c799..3f613231 100644 --- a/websocket-sharp/Net/Cookie.cs +++ b/websocket-sharp/Net/Cookie.cs @@ -478,13 +478,19 @@ namespace WebSocketSharp.Net throw new CookieException ( "The value specified for the Port attribute isn't enclosed in double quotes."); + int[] ports; string err; - if (!tryCreatePorts (value, out _ports, out err)) - throw new CookieException ( - String.Format ( - "The value specified for the Port attribute contains an invalid value: {0}", err)); + if (!tryCreatePorts (value, out ports, out err)) { + var msg = String.Format ( + "The value specified for the Port attribute contains an invalid value: {0}", + err + ); + + throw new CookieException (msg); + } _port = value; + _ports = ports; } }