[Modify] Polish it

This commit is contained in:
sta 2017-08-16 13:56:09 +09:00
parent 0968867f49
commit 3c792717e8

View File

@ -3403,8 +3403,10 @@ namespace WebSocketSharp
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");
}
sendAsync (Opcode.Text, new MemoryStream (bytes), completed); sendAsync (Opcode.Text, new MemoryStream (bytes), completed);
} }