diff --git a/websocket-sharp/Net/HttpListenerResponse.cs b/websocket-sharp/Net/HttpListenerResponse.cs index ed4b62cd..e81557d4 100644 --- a/websocket-sharp/Net/HttpListenerResponse.cs +++ b/websocket-sharp/Net/HttpListenerResponse.cs @@ -622,8 +622,10 @@ namespace WebSocketSharp.Net return; } - if (value.Length == 0) - throw new ArgumentException ("An empty string.", "value"); + if (value.Length == 0) { + var msg = "An empty string."; + throw new ArgumentException (msg, "value"); + } Uri uri; if (!Uri.TryCreate (value, UriKind.Absolute, out uri))