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

Function ErrorGeneratorBuilder

Tests/CMakeLib/testJSONHelpers.cxx:33–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31using ErrorGenerator =
32 std::function<void(Json::Value const*, cmJSONState* state)>;
33ErrorGenerator ErrorGeneratorBuilder(std::string errorMessage)
34{
35 return [errorMessage](Json::Value const* value, cmJSONState* state) -> void {
36 state->AddErrorAtValue(errorMessage, value);
37 };
38};
39ErrorGenerator InvalidArray = ErrorGeneratorBuilder("Invalid Array");
40ErrorGenerator MissingRequired = ErrorGeneratorBuilder("Missing Required");
41ErrorGenerator InvalidMap = ErrorGeneratorBuilder("Invalid Map");

Callers 1

Calls 1

AddErrorAtValueMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…