Fix parser issue when HHMMSS is too long
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Data.Entity.Validation;
|
||||
using System.Linq;
|
||||
using LeafWeb.Core.Entities;
|
||||
using LeafWeb.Core.Parsers;
|
||||
@@ -53,11 +54,22 @@ namespace LeafWeb.WebCms.Services.PiscalQueue
|
||||
{
|
||||
var parser = new LeafInputCsvParser(outputFile.FileContents.Contents);
|
||||
var data = parser.Parse();
|
||||
LeafInputCleaner.Clean(data);
|
||||
data.LeafInput = leafInput;
|
||||
data.LeafOutputFile = outputFile;
|
||||
leafInput.LeafInputData.Add(data);
|
||||
DataService.UpdateLeafInput(leafInput);
|
||||
}
|
||||
catch (DbEntityValidationException ex)
|
||||
{
|
||||
var valErrors =
|
||||
string.Join("",
|
||||
ex.EntityValidationErrors.Select(
|
||||
e => string.Join(Environment.NewLine,
|
||||
e.ValidationErrors.Select(v => $"{v.PropertyName} - {v.ErrorMessage}"))));
|
||||
Logger.Error($"LeafInput: {leafInput.Id}, while parsing CleanedInput file: {outputFile.Filename}"+
|
||||
$"{Environment.NewLine}Validation Errors:{valErrors}");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.Error($"LeafInput: {leafInput.Id}, while parsing CleanedInput file: {outputFile.Filename}", e);
|
||||
|
||||
Reference in New Issue
Block a user