fix thrown hard exception in analyzer

This commit is contained in:
rootdarkarchon
2023-10-11 01:20:49 +02:00
parent afe6c75688
commit a46c63c12a

View File

@@ -90,7 +90,15 @@ public sealed class CharacterAnalyzer : MediatorSubscriberBase, IDisposable
var filePath = fileCacheEntries[0].ResolvedFilepath;
FileInfo fi = new(filePath);
var ext = fi.Extension[1..];
string ext = "unk?";
try
{
ext = fi.Extension[1..];
}
catch (Exception ex)
{
Logger.LogWarning(ex, "Could not identify extension for {path}", filePath);
}
foreach (var entry in fileCacheEntries)
{