Merge pull request #1282 from LostDragonist/bad_egs

Catch exceptions when reading broken EGS manifests
This commit is contained in:
Timothy Baldridge 2021-01-28 20:45:06 -07:00 committed by GitHub
commit 1500e93356
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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}");
}
}
}