[Modify] Throw InvalidOperationException
This commit is contained in:
parent
010d6a63c5
commit
c4fcf530bc
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user