MCPcopy Create free account
hub / github.com/Niko1221/Strata / last_error

Function last_error

engine/src/core/conversation_file.cpp:155–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153}
154
155std::string last_error(DWORD code = GetLastError()) {
156 char msg[256] = {};
157 const DWORD n = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, nullptr, code, 0, msg,
158 sizeof msg, nullptr);
159 std::string s(msg, n);
160 while (!s.empty() && (s.back() == '\n' || s.back() == '\r' || s.back() == ' ' || s.back() == '.')) s.pop_back();
161 return s.empty() ? "error " + std::to_string(code) : s;
162}
163
164class RawFile {
165public:

Callers 10

create_newMethod · 0.85
open_sessionMethod · 0.85
open_modelMethod · 0.85
write_allMethod · 0.85
read_someMethod · 0.85
read_atMethod · 0.85
truncateMethod · 0.85
syncMethod · 0.85
closeMethod · 0.85
publishMethod · 0.85

Calls 4

to_stringFunction · 0.50
emptyMethod · 0.45
backMethod · 0.45
pop_backMethod · 0.45

Tested by

no test coverage detected