From f1879733b6d56f5edefcec9135fa02579f411eb0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 8 Dec 2025 02:04:21 +0000 Subject: [PATCH] Consolidate exception handling for better maintainability - Combine catch blocks since all exceptions are handled identically - Improve code clarity with more descriptive comments Co-authored-by: aleks-f <2429093+aleks-f@users.noreply.github.com> --- Net/src/WebSocketImpl.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Net/src/WebSocketImpl.cpp b/Net/src/WebSocketImpl.cpp index 04e039b6a..795c6c706 100644 --- a/Net/src/WebSocketImpl.cpp +++ b/Net/src/WebSocketImpl.cpp @@ -52,15 +52,11 @@ WebSocketImpl::WebSocketImpl(StreamSocketImpl* pStreamSocketImpl, HTTPSession& s } catch (NetException&) { - // Ignore socket errors (e.g., socket not connected or doesn't support TCP options) + // Ignore - socket errors (e.g., not connected or doesn't support TCP options) } - catch (IOException&) + catch (Poco::Exception&) { - // Ignore I/O errors from socket configuration - } - catch (InvalidArgumentException&) - { - // Ignore invalid argument errors from socket configuration + // Ignore - other configuration errors (IOException, InvalidArgumentException, etc.) } }