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

Class first_error_handler

src/json-validator.cpp:374–393  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

372{
373
374class first_error_handler : public error_handler
375{
376public:
377 bool error_{false};
378 json::json_pointer ptr_;
379 json instance_;
380 std::string message_;
381
382 void error(const json::json_pointer &ptr, const json &instance, const std::string &message) override
383 {
384 if (*this)
385 return;
386 error_ = true;
387 ptr_ = ptr;
388 instance_ = instance;
389 message_ = message;
390 }
391
392 operator bool() const { return error_; }
393};
394
395class logical_not : public schema
396{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected