impr: Better JSON error handling in many places

This commit is contained in:
WerWolv
2023-05-16 11:33:00 +02:00
parent 7e9b23de7d
commit 3bd4a3ba8b
14 changed files with 46 additions and 45 deletions

View File

@@ -147,11 +147,11 @@ namespace hex::plugin::builtin {
void load(const nlohmann::json &json) override {
try {
this->m_polynomial = json["polynomial"];
this->m_initialValue = json["initialValue"];
this->m_xorOut = json["xorOut"];
this->m_reflectIn = json["reflectIn"];
this->m_reflectOut = json["reflectOut"];
this->m_polynomial = json.at("polynomial");
this->m_initialValue = json.at("initialValue");
this->m_xorOut = json.at("xorOut");
this->m_reflectIn = json.at("reflectIn");
this->m_reflectOut = json.at("reflectOut");
} catch (std::exception&) { }
}