[Modify] Polish it

This commit is contained in:
sta 2021-11-13 21:50:43 +09:00
parent e01148acff
commit ebca14a624

View File

@ -752,7 +752,8 @@ namespace WebSocketSharp.Server
public void BroadcastAsync (string data, Action completed) public void BroadcastAsync (string data, Action completed)
{ {
if (_state != ServerState.Start) { if (_state != ServerState.Start) {
var msg = "The current state of the manager is not Start."; var msg = "The current state of the service is not Start.";
throw new InvalidOperationException (msg); throw new InvalidOperationException (msg);
} }
@ -760,8 +761,10 @@ namespace WebSocketSharp.Server
throw new ArgumentNullException ("data"); throw new ArgumentNullException ("data");
byte[] bytes; byte[] bytes;
if (!data.TryGetUTF8EncodedBytes (out bytes)) { if (!data.TryGetUTF8EncodedBytes (out bytes)) {
var msg = "It could not be UTF-8-encoded."; var msg = "It could not be UTF-8-encoded.";
throw new ArgumentException (msg, "data"); throw new ArgumentException (msg, "data");
} }