mirror of
https://github.com/xenia-project/xenia.git
synced 2025-12-06 07:12:03 +01:00
[Core] Report the actual reason config parse failed.
This commit is contained in:
parent
53b564c1a6
commit
9a9a55aa49
|
|
@ -21,8 +21,9 @@ bool sortCvar(cvar::IConfigVar* a, cvar::IConfigVar* b) {
|
|||
std::shared_ptr<cpptoml::table> ParseConfig(std::string config_path) {
|
||||
try {
|
||||
return cpptoml::parse_file(config_path);
|
||||
} catch (cpptoml::parse_exception) {
|
||||
xe::FatalError("Failed to parse config file: %s", config_path.c_str());
|
||||
} catch (cpptoml::parse_exception e) {
|
||||
xe::FatalError("Failed to parse config file '%s':\n\n%s",
|
||||
config_path.c_str(), e.what());
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue