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

Function NetworkErrorString

src/netbase.cpp:1337–1351  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1335
1336#ifdef WIN32
1337std::string NetworkErrorString(int err)
1338{
1339 char buf[256];
1340 buf[0] = 0;
1341 if(FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_MAX_WIDTH_MASK,
1342 NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
1343 buf, sizeof(buf), NULL))
1344 {
1345 return strprintf("%s (%d)", buf, err);
1346 }
1347 else
1348 {
1349 return strprintf("Unknown error (%d)", err);
1350 }
1351}
1352#else
1353std::string NetworkErrorString(int err)
1354{

Callers 6

ConnectSocketDirectlyFunction · 0.85
SocketSendDataFunction · 0.85
ThreadSocketHandlerFunction · 0.85
BOOST_FOREACHFunction · 0.85
BindListenPortFunction · 0.85
~CNetCleanupMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected