From 6d90d14db89e40215bd86640db5d9bc4d418cc9f Mon Sep 17 00:00:00 2001 From: sta Date: Tue, 20 May 2025 21:27:56 +0900 Subject: [PATCH] [Modify] Throw an exception --- websocket-sharp/WebSocket.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/websocket-sharp/WebSocket.cs b/websocket-sharp/WebSocket.cs index bb2869b5..d8e6cb2a 100644 --- a/websocket-sharp/WebSocket.cs +++ b/websocket-sharp/WebSocket.cs @@ -537,8 +537,18 @@ namespace WebSocketSharp /// /// A that provides the logging function. /// + /// + /// The get operation is not available if the interface is not for + /// the client. + /// public Logger Log { get { + if (!_isClient) { + var msg = "The get operation is not available."; + + throw new InvalidOperationException (msg); + } + return _log; }