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>
This commit is contained in:
copilot-swe-agent[bot]
2025-12-08 02:04:21 +00:00
parent ca9b05072a
commit f1879733b6

View File

@@ -52,15 +52,11 @@ WebSocketImpl::WebSocketImpl(StreamSocketImpl* pStreamSocketImpl, HTTPSession& s
} }
catch (NetException&) 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 // Ignore - other configuration errors (IOException, InvalidArgumentException, etc.)
}
catch (InvalidArgumentException&)
{
// Ignore invalid argument errors from socket configuration
} }
} }