Handle errors during monitoring.

This commit is contained in:
Xjph 2021-10-27 22:07:41 -02:30
commit 5eb6a7761d

View file

@ -344,7 +344,14 @@ namespace Observatory
foreach (string line in fileContent.Skip(currentLine[eventArgs.FullPath]))
{
DeserializeAndInvoke(line);
try
{
DeserializeAndInvoke(line);
}
catch (Exception ex)
{
ReportErrors(new List<(Exception ex, string file, string line)>() { (ex, eventArgs.Name, line) });
}
}
currentLine[eventArgs.FullPath] = fileContent.Count;