MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / Win32ErrorString

Function Win32ErrorString

src/util/syserror.cpp:41–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39
40#if defined(WIN32)
41std::string Win32ErrorString(int err)
42{
43 char buf[256];
44 buf[0] = 0;
45 if (FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_MAX_WIDTH_MASK,
46 nullptr, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
47 buf, ARRAYSIZE(buf), nullptr)) {
48 return strprintf("%s (%d)", buf, err);
49 } else {
50 return strprintf("Unknown error (%d)", err);
51 }
52}
53#endif

Callers 3

FileCommitFunction · 0.85
GetErrorReasonFunction · 0.85
NetworkErrorStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected