mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Add exception messages to data load I_Errors
This commit is contained in:
parent
d90a566ad7
commit
723546a56b
2 changed files with 13 additions and 1 deletions
|
|
@ -434,6 +434,13 @@ void srb2::load_ng_gamedata()
|
|||
json parsed = json::from_ubjson(remainder_as_u8);
|
||||
js = parsed.template get<GamedataJson>();
|
||||
}
|
||||
catch (const std::exception& ex)
|
||||
{
|
||||
const char* gdfolder = G_GameDataFolder();
|
||||
const char* what = ex.what();
|
||||
I_Error("Game data is corrupt.\nDelete %s (maybe in %s) and try again.\n\nException: %s", gamedatafilename, gdfolder, what);
|
||||
return;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
const char* gdfolder = G_GameDataFolder();
|
||||
|
|
|
|||
|
|
@ -398,9 +398,14 @@ void PR_LoadProfiles(void)
|
|||
json parsed = json::from_ubjson(remainder_as_u8);
|
||||
js = parsed.template get<ProfilesJson>();
|
||||
}
|
||||
catch (const std::exception& ex)
|
||||
{
|
||||
I_Error("Profiles file is corrupt.\n\nException: %s", ex.what());
|
||||
return;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
I_Error("Profiles file is corrupt");
|
||||
I_Error("Profiles file is corrupt.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue