MCPcopy Create free account
hub / github.com/pboettch/json-schema-validator / store_ptr_err_handler

Class store_ptr_err_handler

test/binary-validation.cpp:73–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71)");
72
73class store_ptr_err_handler : public nlohmann::json_schema::basic_error_handler
74{
75 void error(const nlohmann::json::json_pointer &ptr, const json &, const std::string &message) override
76 {
77 nlohmann::json_schema::basic_error_handler::error(ptr, "", message);
78 std::cerr << "ERROR: '" << ptr << "' - '"
79 << ""
80 << "': " << message << "\n";
81 failed_pointers.push_back(ptr);
82 }
83
84public:
85 std::vector<nlohmann::json::json_pointer> failed_pointers;
86
87 void reset() override
88 {
89 nlohmann::json_schema::basic_error_handler::reset();
90 failed_pointers.clear();
91 }
92};
93
94static void content(const std::string &contentEncoding, const std::string &contentMediaType, const json &instance)
95{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected