1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-10-31 00:07:39 +02:00

Show error message if vcmi unable to access data directory instead of

silent crash
This commit is contained in:
Ivan Savenko
2024-06-19 18:25:54 +00:00
parent 0e4be8c776
commit 2b7131cfea
3 changed files with 20 additions and 3 deletions

View File

@@ -208,7 +208,14 @@ int main(int argc, char * argv[])
logGlobal->info("The log file will be saved to %s", logPath);
// Init filesystem and settings
preinitDLL(::console, false);
try
{
preinitDLL(::console, false);
}
catch (const DataLoadingException & e)
{
handleFatalError(e.what(), true);
}
Settings session = settings.write["session"];
auto setSettingBool = [&](std::string key, std::string arg) {