mirror of
https://github.com/RPCSX/rpcsx.git
synced 2025-12-06 07:12:14 +01:00
18 lines
293 B
C++
18 lines
293 B
C++
|
|
#include "util/yaml.hpp"
|
|||
|
|
|
|||
|
|
std::pair<YAML::Node, std::string> yaml_load(const std::string& from)
|
|||
|
|
{
|
|||
|
|
YAML::Node result;
|
|||
|
|
|
|||
|
|
try
|
|||
|
|
{
|
|||
|
|
result = YAML::Load(from);
|
|||
|
|
}
|
|||
|
|
catch(const std::exception& e)
|
|||
|
|
{
|
|||
|
|
return{YAML::Node(), std::string("YAML exception:\n") + e.what()};
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return{result, ""};
|
|||
|
|
}
|