Browse Source

[Modify] Throw an exception

pull/571/merge
sta 2 months ago
parent
commit
6d90d14db8
  1. 10
      websocket-sharp/WebSocket.cs

10
websocket-sharp/WebSocket.cs

@ -537,8 +537,18 @@ namespace WebSocketSharp
/// <value>
/// A <see cref="Logger"/> that provides the logging function.
/// </value>
/// <exception cref="InvalidOperationException">
/// The get operation is not available if the interface is not for
/// the client.
/// </exception>
public Logger Log {
get {
if (!_isClient) {
var msg = "The get operation is not available.";
throw new InvalidOperationException (msg);
}
return _log;
}

Loading…
Cancel
Save