Index: Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/StructuresImporter.cs =================================================================== diff -u -r34bec423be51e69135874f811713b5e41de8b379 -r56a1b0ad79756583461f17301d0edcd79a1d0de4 --- Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/StructuresImporter.cs (.../StructuresImporter.cs) (revision 34bec423be51e69135874f811713b5e41de8b379) +++ Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/StructuresImporter.cs (.../StructuresImporter.cs) (revision 56a1b0ad79756583461f17301d0edcd79a1d0de4) @@ -197,15 +197,11 @@ StructuresParameterRow row = rowsReader.ReadLine(); rows.Add(row); } - catch (CriticalFileReadException exception) + catch (Exception exception) when (exception is CriticalFileReadException || exception is LineParseException) { log.Error(exception.Message); return new ReadResult(true); } - catch (LineParseException exception) - { - log.Error(exception.Message); - } } return new ReadResult(false) @@ -281,8 +277,11 @@ /// Reader reading objects from a shapefile. /// Collection of objects /// to which the new is to be added. - /// Thrown when the - /// reads multiple structures for a structure. + /// Thrown when either: + /// + /// The reads multiple structures for a structure. + /// A structure read from the is not on the reference line. + /// /// Thrown when either: /// /// The shapefile misses a value for a required attribute. @@ -294,8 +293,8 @@ double distanceToReferenceLine = GetDistanceToReferenceLine(structureLocation.Point); if (distanceToReferenceLine > 1.0) { - log.ErrorFormat(Resources.StructuresImporter_AddNextStructureLocation_0_skipping_location_outside_referenceline, structureLocation.Id); - return; + string message = string.Format(Resources.StructuresImporter_AddNextStructureLocation_Location_0_outside_referenceline, structureLocation.Id); + throw new CriticalFileReadException(message); } if (structureLocations.Any(dpl => dpl.Id.Equals(structureLocation.Id))) {