MCPcopy Create free account
hub / github.com/Tom94/tev / errorString

Function errorString

src/Common.cpp:397–417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

395}
396
397string errorString(int errorId) {
398#ifdef _WIN32
399 char* s = NULL;
400 FormatMessage(
401 FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
402 NULL,
403 errorId,
404 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
405 (LPSTR)&s,
406 0,
407 NULL
408 );
409
410 string result = fmt::format("{} ({})", s, errorId);
411 LocalFree(s);
412
413 return result;
414#else
415 return fmt::format("{} ({})", strerror(errorId), errno);
416#endif
417}
418
419fs::path homeDirectory() {
420#ifdef _WIN32

Callers 8

makeSocketNonBlockingFunction · 0.85
IpcMethod · 0.85
~IpcMethod · 0.85
sendToPrimaryInstanceMethod · 0.85
serviceMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected