json-schema-validator/test/issue-98.cpp
Patrick Boettcher 81eba4928d fix #98: catch out-of-range-exception only
Leave other exception go through - real errors.
2020-04-09 15:16:25 +02:00

11 lines
253 B
C++

#include <nlohmann/json-schema.hpp>
int main(void)
{
nlohmann::json nlBase{{"$ref", "#/unknown/keywords"}};
nlohmann::json_schema::json_validator validator;
validator.set_root_schema(nlBase); // this line will log the caught exception
return 0;
}