1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 18:53:28 +01:00

CFG: catch exceptions

This commit is contained in:
Nekotekina 2017-08-02 13:23:12 +03:00
parent faf9ed9fec
commit f6c8f46462

View File

@ -276,11 +276,16 @@ std::string cfg::node::to_string() const
return {out.c_str(), out.size()};
}
bool cfg::node::from_string(const std::string& value)
bool cfg::node::from_string(const std::string& value) try
{
cfg::decode(YAML::Load(value), *this);
return true;
}
catch (const std::exception& e)
{
cfg.fatal("%s thrown: %s", typeid(e).name(), e.what());
return false;
}
void cfg::node::from_default()
{