MCPcopy Create free account
hub / github.com/TranslucentTB/TranslucentTB / MessageFromStdErrorCode

Method MessageFromStdErrorCode

ProgramLog/error/std.cpp:6–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4#include "win32.hpp"
5
6std::wstring Error::MessageFromStdErrorCode(const std::error_code &err)
7{
8 if (err.category() == std::system_category())
9 {
10 return MessageFromHRESULT(HRESULT_FROM_WIN32(err.value()));
11 }
12 else if (err.category() == std::generic_category())
13 {
14 return MessageFromErrno(err.value());
15 }
16 else
17 {
18 return L"Unknown error";
19 }
20}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected