Catch exceptions when reading broken EGS manifests

This commit is contained in:
Chris Bessent 2021-01-26 03:09:42 -07:00
parent 4a32fc1415
commit 6b18564dc1

View File

@ -38,6 +38,8 @@ namespace Wabbajack.Common.StoreHandlers
.ToDictionary(t => t.Key, t => t.First().Game);
foreach (var itm in ((AbsolutePath)(string)(name!)).EnumerateFiles(false, "*.item"))
{
try
{
var item = itm.FromJson<EpicGameItem>();
Utils.Log($"Found Epic Game Store Game: {item.DisplayName} at {item.InstallLocation}");
@ -46,6 +48,11 @@ namespace Wabbajack.Common.StoreHandlers
{
Games.Add(new EpicStoreGame(game, item));
}
}
catch (Newtonsoft.Json.JsonReaderException)
{
Utils.Log($"Failure parsing Epic Game Store manifest: {itm}");
}
}
}