[Modify] Throw an exception

This commit is contained in:
sta 2019-10-31 20:11:33 +09:00
parent 697b46a600
commit 9fe178710b

View File

@ -548,7 +548,10 @@ namespace WebSocketSharp.Net
throw new InvalidOperationException (msg); throw new InvalidOperationException (msg);
} }
if (value == null || value.Length == 0) { if (value == null)
throw new ArgumentNullException ("value");
if (value.Length == 0) {
_statusDescription = _statusCode.GetStatusDescription (); _statusDescription = _statusCode.GetStatusDescription ();
return; return;
} }