MCPcopy Create free account
hub / github.com/Kitware/CMake / GetString

Method GetString

Source/kwsys/Status.cxx:36–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34#endif
35
36std::string Status::GetString() const
37{
38 std::string err;
39 switch (this->Kind_) {
40 case Kind::Success:
41 err = "Success";
42 break;
43 case Kind::POSIX:
44 err = strerror(this->POSIX_);
45 break;
46#ifdef _WIN32
47 case Kind::Windows: {
48 LPWSTR message = NULL;
49 DWORD size = FormatMessageW(
50 FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
51 FORMAT_MESSAGE_IGNORE_INSERTS,
52 NULL, this->Windows_, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
53 (LPWSTR)&message, 0, NULL);
54 err = kwsys::Encoding::ToNarrow(message);
55 LocalFree(message);
56 } break;
57#endif
58 default:
59 break;
60 }
61 return err;
62}
63
64} // namespace KWSYS_NAMESPACE

Callers 15

testMakeTempDirectoryFunction · 0.45
deserializeMethod · 0.45
dumpMethod · 0.45
ConfigureFileMethod · 0.45
CreateXCodeSourceFileMethod · 0.45
CreateXCodeTargetMethod · 0.45
CreateCustomCommandsMethod · 0.45
CreateGroupsMethod · 0.45
InitFromInfoMethod · 0.45
CreateNewTagMethod · 0.45
InitFromInfoMethod · 0.45

Calls

no outgoing calls

Tested by 3

testMakeTempDirectoryFunction · 0.36
CreateNewTagMethod · 0.36
testStatusFunction · 0.36