[Modify] Polish it

This commit is contained in:
sta 2017-04-10 14:19:20 +09:00
parent d005fd9789
commit 1a3e67fc9d

View File

@ -689,8 +689,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)) {
throw new ArgumentException ("It could not be UTF-8-encoded.", "data"); var msg = "It could not be UTF-8-encoded.";
throw new ArgumentException (msg, "data");
}
if (bytes.LongLength <= WebSocket.FragmentLength) if (bytes.LongLength <= WebSocket.FragmentLength)
broadcastAsync (Opcode.Text, bytes, completed); broadcastAsync (Opcode.Text, bytes, completed);