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

Class logical_combination_error_handler

src/json-validator.cpp:429–452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

427};
428
429class logical_combination_error_handler : public error_handler
430{
431public:
432 struct error_entry {
433 json::json_pointer ptr_;
434 json instance_;
435 std::string message_;
436 };
437
438 std::vector<error_entry> error_entry_list_;
439
440 void error(const json::json_pointer &ptr, const json &instance, const std::string &message) override
441 {
442 error_entry_list_.push_back(error_entry{ptr, instance, message});
443 }
444
445 void propagate(error_handler &e, const std::string &prefix) const
446 {
447 for (const error_entry &entry : error_entry_list_)
448 e.error(entry.ptr_, entry.instance_, prefix + entry.message_);
449 }
450
451 operator bool() const { return !error_entry_list_.empty(); }
452};
453
454template <enum logical_combination_types combine_logic>
455class logical_combination : public schema

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected