mirror of
https://github.com/pocoproject/poco.git
synced 2025-12-11 12:07:23 +01:00
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:
@@ -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.)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user