[Modify] Throw InvalidOperationException
This commit is contained in:
parent
d3886a256a
commit
8d372c0371
@ -895,12 +895,6 @@ namespace WebSocketSharp.Server
|
|||||||
/// -or-
|
/// -or-
|
||||||
/// </para>
|
/// </para>
|
||||||
/// <para>
|
/// <para>
|
||||||
/// The session could not be found.
|
|
||||||
/// </para>
|
|
||||||
/// <para>
|
|
||||||
/// -or-
|
|
||||||
/// </para>
|
|
||||||
/// <para>
|
|
||||||
/// <paramref name="code"/> is 1010 (mandatory extension).
|
/// <paramref name="code"/> is 1010 (mandatory extension).
|
||||||
/// </para>
|
/// </para>
|
||||||
/// <para>
|
/// <para>
|
||||||
@ -917,6 +911,9 @@ namespace WebSocketSharp.Server
|
|||||||
/// <paramref name="reason"/> could not be UTF-8-encoded.
|
/// <paramref name="reason"/> could not be UTF-8-encoded.
|
||||||
/// </para>
|
/// </para>
|
||||||
/// </exception>
|
/// </exception>
|
||||||
|
/// <exception cref="InvalidOperationException">
|
||||||
|
/// The session could not be found.
|
||||||
|
/// </exception>
|
||||||
/// <exception cref="ArgumentOutOfRangeException">
|
/// <exception cref="ArgumentOutOfRangeException">
|
||||||
/// <para>
|
/// <para>
|
||||||
/// <paramref name="code"/> is less than 1000 or greater than 4999.
|
/// <paramref name="code"/> is less than 1000 or greater than 4999.
|
||||||
@ -933,7 +930,7 @@ namespace WebSocketSharp.Server
|
|||||||
IWebSocketSession session;
|
IWebSocketSession session;
|
||||||
if (!TryGetSession (id, out session)) {
|
if (!TryGetSession (id, out session)) {
|
||||||
var msg = "The session could not be found.";
|
var msg = "The session could not be found.";
|
||||||
throw new ArgumentException (msg, "id");
|
throw new InvalidOperationException (msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
session.Context.WebSocket.Close (code, reason);
|
session.Context.WebSocket.Close (code, reason);
|
||||||
|
Loading…
Reference in New Issue
Block a user