mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-05-10 19:21:38 +00:00
config: add exception handler
This commit is contained in:
parent
c8a7b65aa8
commit
bdfa5e874f
1 changed files with 41 additions and 34 deletions
|
|
@ -1,5 +1,7 @@
|
|||
void Config::Load()
|
||||
{
|
||||
try
|
||||
{
|
||||
auto toml = toml::parse_file(TOML_FILE);
|
||||
|
||||
TOML_BEGIN_SECTION("System")
|
||||
|
|
@ -39,6 +41,11 @@ void Config::Load()
|
|||
TOML_READ_INTEGER(BufferCount);
|
||||
}
|
||||
TOML_END_SECTION();
|
||||
}
|
||||
catch (toml::parse_error& err)
|
||||
{
|
||||
printf("Failed to parse configuration: %s\n", err.what());
|
||||
}
|
||||
}
|
||||
|
||||
void Config::Save()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue