mirror of https://github.com/RPCS3/rpcs3.git
CFG: catch exceptions
This commit is contained in:
parent
faf9ed9fec
commit
f6c8f46462
|
@ -276,11 +276,16 @@ std::string cfg::node::to_string() const
|
||||||
return {out.c_str(), out.size()};
|
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);
|
cfg::decode(YAML::Load(value), *this);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
catch (const std::exception& e)
|
||||||
|
{
|
||||||
|
cfg.fatal("%s thrown: %s", typeid(e).name(), e.what());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void cfg::node::from_default()
|
void cfg::node::from_default()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue