fix JsonValidation leaking exceptions on into

This commit is contained in:
HJfod 2024-02-12 17:37:50 +02:00
parent 131539fa00
commit 83847e37a1

View file

@ -192,7 +192,14 @@ namespace geode {
if (this->isError()) return *this;
if (self().m_json.template is<A>()) {
target = self().m_json.template as<A>();
try {
target = self().m_json.template as<A>();
}
catch(matjson::JsonException const& e) {
this->setError(
self().m_hierarchy + ": Error parsing JSON: " + std::string(e.what())
);
}
}
else {
this->setError(