[Modify] Polish it

This commit is contained in:
sta 2017-08-13 15:40:15 +09:00
parent 60540f9dc6
commit dc5ae5990e

View File

@ -3167,8 +3167,10 @@ namespace WebSocketSharp
throw new ArgumentNullException ("data");
byte[] bytes;
if (!data.TryGetUTF8EncodedBytes (out bytes))
throw new ArgumentException ("It could not be UTF-8-encoded.", "data");
if (!data.TryGetUTF8EncodedBytes (out bytes)) {
var msg = "It could not be UTF-8-encoded.";
throw new ArgumentException (msg, "data");
}
send (Opcode.Text, new MemoryStream (bytes));
}