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

Function EXPECTED_TYPE

Source/cmJSONHelpers.cxx:16–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14
15namespace JsonErrors {
16ErrorGenerator EXPECTED_TYPE(std::string const& type)
17{
18 return [type](Json::Value const* value, cmJSONState* state) -> void {
19 if (state->key().empty()) {
20 state->AddErrorAtValue(cmStrCat("Expected ", type), value);
21 return;
22 }
23 std::string errMsg = cmStrCat('"', state->key(), "\" expected ", type);
24 if (value && value->isConvertibleTo(Json::ValueType::stringValue)) {
25 errMsg = cmStrCat(errMsg, ", got: ", value->asString());
26 }
27 state->AddErrorAtValue(errMsg, value);
28 };
29}
30
31void INVALID_STRING(Json::Value const* value, cmJSONState* state)
32{

Callers 5

cmXcFramework.cxxFile · 0.85
INVALID_STRINGFunction · 0.85
INVALID_BOOLFunction · 0.85
INVALID_INTFunction · 0.85
INVALID_UINTFunction · 0.85

Calls 6

keyMethod · 0.80
AddErrorAtValueMethod · 0.80
isConvertibleToMethod · 0.80
asStringMethod · 0.80
cmStrCatFunction · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…