MCPcopy Create free account
hub / github.com/ccomrade/c1-launcher / GetErrorCodeDescription

Method GetErrorCodeDescription

Code/Library/WinAPI.cpp:25–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23}
24
25std::string WinAPI::GetErrorCodeDescription(int code)
26{
27 const DWORD flags = FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS;
28
29 char buffer[256];
30 const DWORD length = FormatMessageA(flags, NULL, code, 0, buffer, sizeof buffer, NULL);
31
32 return std::string(buffer, length);
33}
34
35std::runtime_error WinAPI::MakeError(const char *format, ...)
36{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected