mirror of
https://github.com/pocoproject/poco.git
synced 2025-12-11 20:37:30 +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&)
|
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
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user