mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Change error message when failing to load json
This commit is contained in:
parent
268c18386c
commit
901ad1d945
@ -462,6 +462,11 @@ namespace NewHorizons
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var config = mod.ModHelper.Storage.Load<PlanetConfig>(relativeDirectory);
|
var config = mod.ModHelper.Storage.Load<PlanetConfig>(relativeDirectory);
|
||||||
|
if (config == null)
|
||||||
|
{
|
||||||
|
Logger.LogError($"Couldn't load {relativeDirectory}. Is your Json formatted correctly?");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
Logger.Log($"Loaded {config.name}");
|
Logger.Log($"Loaded {config.name}");
|
||||||
|
|
||||||
@ -488,7 +493,7 @@ namespace NewHorizons
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Logger.LogError($"Couldn't load {relativeDirectory}: {e.Message} {e.StackTrace}, is your Json formatted correctly?");
|
Logger.LogError($"Error encounter when loading {relativeDirectory}: {e.Message} {e.StackTrace}");
|
||||||
}
|
}
|
||||||
|
|
||||||
return body;
|
return body;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user