MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / ThrowWin32Exception

Function ThrowWin32Exception

src/openrct2/core/Http.WinHttp.cpp:31–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29 static constexpr char kOpenRCT2UserAgent[] = "OpenRCT2/" kOpenRCT2Version;
30
31 static void ThrowWin32Exception(const char* methodName)
32 {
33 auto errorCode = GetLastError();
34 auto msg = String::stdFormat("%s failed, error: %d.", methodName, errorCode);
35 throw std::runtime_error(msg);
36 }
37
38 static const wchar_t* GetVerb(Method method)
39 {

Callers 4

ReadStatusCodeFunction · 0.85
ReadHeadersFunction · 0.85
ReadBodyFunction · 0.85
DoFunction · 0.85

Calls 1

stdFormatFunction · 0.85

Tested by

no test coverage detected