Improve doc and examples related to error handling
This commit is contained in:
parent
8f5d83c5c2
commit
96903b4d25
10
README.md
10
README.md
@ -138,10 +138,12 @@ webSocket.setOnMessageCallback(
|
||||
{
|
||||
if (messageType == ix::WebSocket_MessageType_Error)
|
||||
{
|
||||
ss << "cmd_websocket_chat: Error ! " << error.reason << std::endl;
|
||||
ss << "#retries: " << event.retries << std::endl;
|
||||
ss << "Wait time(ms): " << event.waitTime << std::endl;
|
||||
ss << "HTTP Status: " << event.httpStatus << std::endl;
|
||||
std::stringstream ss;
|
||||
ss << "Error: " << error.reason << std::endl;
|
||||
ss << "#retries: " << event.retries << std::endl;
|
||||
ss << "Wait time(ms): " << event.wait_time << std::endl;
|
||||
ss << "HTTP Status: " << event.http_status << std::endl;
|
||||
std::cout << ss.str() << std::endl;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
@ -117,7 +117,10 @@ namespace
|
||||
}
|
||||
else if (messageType == ix::WebSocket_MessageType_Error)
|
||||
{
|
||||
ss << "cmd_websocket_chat: Error ! " << error.reason;
|
||||
ss << "Connection error: " << error.reason << std::endl;
|
||||
ss << "#retries: " << error.retries << std::endl;
|
||||
ss << "Wait time(ms): " << error.wait_time << std::endl;
|
||||
ss << "HTTP Status: " << error.http_status << std::endl;
|
||||
log(ss.str());
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user