| 23 | } |
| 24 | |
| 25 | std::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 | |
| 35 | std::runtime_error WinAPI::MakeError(const char *format, ...) |
| 36 | { |
nothing calls this directly
no outgoing calls
no test coverage detected