Skip to content

Commit 1ba066b

Browse files
committed
Better relisience while trying to reading data from cache.
1 parent b713ca6 commit 1ba066b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Source/ModuleManager/MMPatchLoader.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ select s.modName
352352
{
353353
SHA_CONFIG.Load();
354354
logger.Info("ConfigSHA loaded");
355-
if (null != SHA_CONFIG.Node)
355+
if (null != SHA_CONFIG.Node) try
356356
{
357357
KSPe.ConfigNodeWithSteroids cs = KSPe.ConfigNodeWithSteroids.from(SHA_CONFIG.Node);
358358
string storedSHA = cs.GetValue("SHA","");
@@ -371,6 +371,11 @@ select s.modName
371371
logger.Info("Cache SHA, SIZE = " + storedSHA + ", " + storedTotalSize);
372372
logger.Info("useCache = " + useCache);
373373
}
374+
catch (Exception e)
375+
{
376+
logger.Error("Error while reading SHA values from cache: " + e.ToString());
377+
useCache = false;
378+
}
374379
}
375380
return useCache;
376381
}

0 commit comments

Comments
 (0)