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

Method GetErrorMessage

Source/cmJSONState.cxx:89–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87}
88
89std::string cmJSONState::GetErrorMessage(bool showContext)
90{
91 std::string message;
92 std::string filenameName = cmSystemTools::GetFilenameName(this->Filename);
93 for (auto const& error : this->errors) {
94 Location loc = error.GetLocation();
95 if (!filenameName.empty() && loc.line > 0) {
96 message = cmStrCat(message, filenameName, ':', loc.line, ": ");
97 }
98 message = cmStrCat(message, error.GetErrorMessage(), '\n');
99 if (showContext && loc.line > 0) {
100 message = cmStrCat(message, GetJsonContext(loc), '\n');
101 }
102 }
103 message.pop_back();
104 return message;
105}
106
107std::string cmJSONState::key()
108{

Callers 15

testFilteredObjectFunction · 0.45
LLVMFuzzerTestOneInputFunction · 0.45
ReadJSONMethod · 0.45
LoadFromFileMethod · 0.45
SetArgsFromPresetMethod · 0.45
PrepareDataForCDashMethod · 0.45
MakeEmptyCallbackFunction · 0.45
ChangeRPathXCOFFFunction · 0.45
RemoveRPathXCOFFFunction · 0.45
HandleReadMachoCommandFunction · 0.45
SetArgsMethod · 0.45

Calls 4

pop_backMethod · 0.80
cmStrCatFunction · 0.70
GetLocationMethod · 0.45
emptyMethod · 0.45

Tested by 5

testFilteredObjectFunction · 0.36
SetArgsFromPresetMethod · 0.36
InitResourceAllocatorMethod · 0.36