[Modify] Throw InvalidOperationException

This commit is contained in:
sta 2017-08-19 15:28:23 +09:00
parent 010d6a63c5
commit c4fcf530bc

View File

@ -1065,15 +1065,12 @@ namespace WebSocketSharp.Server
/// -or-
/// </para>
/// <para>
/// The session could not be found.
/// </para>
/// <para>
/// -or-
/// </para>
/// <para>
/// <paramref name="message"/> could not be UTF-8-encoded.
/// </para>
/// </exception>
/// <exception cref="InvalidOperationException">
/// The session could not be found.
/// </exception>
/// <exception cref="ArgumentOutOfRangeException">
/// The size of <paramref name="message"/> is greater than 125 bytes.
/// </exception>
@ -1082,7 +1079,7 @@ namespace WebSocketSharp.Server
IWebSocketSession session;
if (!TryGetSession (id, out session)) {
var msg = "The session could not be found.";
throw new ArgumentException (msg, "id");
throw new InvalidOperationException (msg);
}
return session.Context.WebSocket.Ping (message);