mirror of
https://github.com/xenia-project/xenia.git
synced 2026-04-20 22:13:40 +00:00
[Core] Report the actual reason config parse failed.
This commit is contained in:
parent
53b564c1a6
commit
9a9a55aa49
1 changed files with 3 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue