Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 56ea8b5d authored by Harald Martini's avatar Harald Martini
Browse files

Added Exception if the same filetype is added twice to a FileOutputWriter

parent 550bbbb0
No related branches found
No related tags found
No related merge requests found
......@@ -38,6 +38,7 @@ using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Linq;
using TUGraz.VectoCommon.Exceptions;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCore.Configuration;
using TUGraz.VectoCore.Utils;
......@@ -163,7 +164,10 @@ namespace TUGraz.VectoCore.OutputData.FileIO
}
var added = _writtenReports.TryAdd(type, fileName);
System.Diagnostics.Debug.Assert(added);
if (!added)
{
throw new VectoException("Report with type: {type} {fileName} already written from this reportwriter");
}
}
protected virtual string GetReportFilename(ReportType type)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment