MCPcopy Create free account
hub / github.com/aria2/aria2 / errorMsg

Function errorMsg

src/SocketCore.cc:103–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101
102namespace {
103std::string errorMsg(int errNum)
104{
105#ifndef __MINGW32__
106 return util::safeStrerror(errNum);
107#else
108 auto msg = util::formatLastError(errNum);
109 if (msg.empty()) {
110 char buf[256];
111 snprintf(buf, sizeof(buf), EX_SOCKET_UNKNOWN_ERROR, errNum, errNum);
112 return buf;
113 }
114 return msg;
115#endif // __MINGW32__
116}
117} // namespace
118
119namespace {

Callers 15

applySocketBufferSizeFunction · 0.85
createMethod · 0.85
bindInternalFunction · 0.85
beginListenMethod · 0.85
acceptConnectionMethod · 0.85
getAddrInfoMethod · 0.85
getPeerInfoMethod · 0.85
establishConnectionMethod · 0.85
setSockOptMethod · 0.85
setNonBlockingModeMethod · 0.85
setBlockingModeMethod · 0.85
isWritableMethod · 0.85

Calls 3

safeStrerrorFunction · 0.85
formatLastErrorFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected