MCPcopy Create free account
hub / github.com/VirtualGL/virtualgl / W32Error

Class W32Error

include/Error.h:103–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101namespace util
102{
103 class W32Error : public Error
104 {
105 public:
106
107 W32Error(const char *method) : Error(method, (char *)NULL)
108 {
109 if(!FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(),
110 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), message, MLEN, NULL))
111 strncpy(message, "Error in FormatMessage()", MLEN);
112 }
113
114 W32Error(const char *method, int line) :
115 Error(method, (char *)NULL, line)
116 {
117 if(!FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(),
118 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), &message[strlen(message)],
119 MLEN - (DWORD)strlen(message), NULL))
120 strncpy(message, "Error in FormatMessage()", MLEN);
121 }
122 };
123}
124
125#define THROW_W32() throw(util::W32Error(__FUNCTION__, __LINE__))

Callers 8

startMethod · 0.85
waitMethod · 0.85
signalMethod · 0.85
isLockedMethod · 0.85
lockMethod · 0.85
unlockMethod · 0.85
tryWaitMethod · 0.85
postMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected