Index: Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.IO/DuneLocationsExporter.cs =================================================================== diff -u -r1e3de334f82be7cffe88d7e80dc336fcdec81086 -rf74ac14b959e92beaef6613ac73c33164204c6be --- Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.IO/DuneLocationsExporter.cs (.../DuneLocationsExporter.cs) (revision 1e3de334f82be7cffe88d7e80dc336fcdec81086) +++ Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.IO/DuneLocationsExporter.cs (.../DuneLocationsExporter.cs) (revision f74ac14b959e92beaef6613ac73c33164204c6be) @@ -23,8 +23,11 @@ using System.Collections.Generic; using System.Linq; using Core.Common.Base.IO; +using Core.Common.IO.Exceptions; using Core.Common.Utils; +using log4net; using Ringtoets.DuneErosion.Data; +using RingtoetsCommonIOResources = Ringtoets.Common.IO.Properties.Resources; namespace Ringtoets.DuneErosion.IO { @@ -33,6 +36,8 @@ /// public class DuneLocationsExporter : IFileExporter { + private static readonly ILog log = LogManager.GetLogger(typeof(DuneLocationsExporter)); + private readonly IEnumerable duneLocations; private readonly string filePath; @@ -64,6 +69,16 @@ public bool Export() { + try + { + DuneLocationsWriter.WriteDuneLocations(duneLocations, filePath); + } + catch (CriticalFileWriteException e) + { + log.ErrorFormat(RingtoetsCommonIOResources.HydraulicBoundaryLocationsExporter_Error_Exception_0_no_HydraulicBoundaryLocations_exported, e.Message); + return false; + } + return true; } }