rpcsx/rpcs3/util/yaml.cpp
Nekotekina 04dedb17eb Disable exception handling.
Use -fno-exceptions in cmake.
On MSVC, enable _HAS_EXCEPTION=0.
Cleanup throw/catch from the source.
Create yaml.cpp enclave because it needs exception to work.
Disable thread_local optimizations in logs.cpp (TODO).
Implement cpu_counter for cpu_threads (moved globals).
2020-03-12 16:03:08 +03:00

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, ""};
}