Fix ParentablePath issues; fix parse logging

This commit is contained in:
Matt Nadareski
2020-09-21 13:04:11 -07:00
parent 07066c2299
commit a04a3485ef
20 changed files with 517 additions and 388 deletions

View File

@@ -65,8 +65,14 @@ namespace SabreTools.Library.DatFiles
}
catch (InvalidDataException ex)
{
Globals.Logger.Warning($"Malformed line found in '{filename}' at line {svr.LineNumber}");
if (throwOnError) throw ex;
string message = $"'{filename}' - There was an error parsing line {svr.LineNumber} '{svr.CurrentLine}'";
Globals.Logger.Error(ex, message);
if (throwOnError)
{
svr.Dispose();
throw new Exception(message, ex);
}
continue;
}