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

@@ -325,9 +325,9 @@ namespace hex::plugin::builtin {
void GDBProvider::loadSettings(const nlohmann::json &settings) {
Provider::loadSettings(settings);
this->m_ipAddress = settings["ip"].get<std::string>();
this->m_port = settings["port"].get<int>();
this->m_size = settings["size"].get<size_t>();
this->m_ipAddress = settings.at("ip").get<std::string>();
this->m_port = settings.at("port").get<int>();
this->m_size = settings.at("size").get<size_t>();
}
nlohmann::json GDBProvider::storeSettings(nlohmann::json settings) const {