Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Merge/AssessmentSectionMergeHandler.cs
===================================================================
diff -u -rbe728a02e74f50b29c4b3dfcbefa2642badfc6ce -r4c958ce7ec9ae0247146de8bf83b5495a6ac2ec0
--- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Merge/AssessmentSectionMergeHandler.cs (.../AssessmentSectionMergeHandler.cs) (revision be728a02e74f50b29c4b3dfcbefa2642badfc6ce)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Merge/AssessmentSectionMergeHandler.cs (.../AssessmentSectionMergeHandler.cs) (revision 4c958ce7ec9ae0247146de8bf83b5495a6ac2ec0)
@@ -182,6 +182,13 @@
#region FailureMechanisms
+ ///
+ /// Merge the failure mechanism to the .
+ ///
+ /// The assessment section to merge to.
+ /// The failure mechanisms to merge.
+ /// Thrown when
+ /// contains an element that can't be merged.
private static void MergeFailureMechanisms(AssessmentSection targetAssessmentSection, IEnumerable failureMechanismsToMerge)
{
ObservableList hydraulicBoundaryLocations = targetAssessmentSection.HydraulicBoundaryDatabase.Locations;
@@ -325,9 +332,14 @@
continue;
}
- TryMergeFailureMechanism(
+ if (TryMergeFailureMechanism(
targetAssessmentSection, failureMechanism,
- (section, mechanism) => section.TechnicalInnovation = mechanism);
+ (section, mechanism) => section.TechnicalInnovation = mechanism))
+ {
+ continue;
+ }
+
+ throw new NotSupportedException("Failure mechanism can't be merged.");
}
}