MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / NetworkErrorString

Function NetworkErrorString

src/netbase.cpp:1152–1161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1150
1151#ifdef WIN32
1152string NetworkErrorString(int32_t err) {
1153 char buf[256];
1154 buf[0] = 0;
1155 if (FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_MAX_WIDTH_MASK, nullptr,
1156 err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), buf, sizeof(buf), nullptr)) {
1157 return strprintf("%s (%d)", buf, err);
1158 } else {
1159 return strprintf("Unknown error (%d)", err);
1160 }
1161}
1162#else
1163string NetworkErrorString(int32_t err) {
1164 char buf[256];

Callers 7

netbase.cppFile · 0.85
RecvLineFunction · 0.85
ConnectNodeFunction · 0.85
ThreadSocketHandlerFunction · 0.85
net.cppFile · 0.85
~CNetCleanupMethod · 0.85
SocketSendDataMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected