Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsFailureMechanismAssemblyFactory.cs =================================================================== diff -u -r914fa96263c1840879529d6d9c092089d58e81de -r670cc9c0402a5485971f18fd7b69013f956d7a60 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsFailureMechanismAssemblyFactory.cs (.../GrassCoverErosionInwardsFailureMechanismAssemblyFactory.cs) (revision 914fa96263c1840879529d6d9c092089d58e81de) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsFailureMechanismAssemblyFactory.cs (.../GrassCoverErosionInwardsFailureMechanismAssemblyFactory.cs) (revision 670cc9c0402a5485971f18fd7b69013f956d7a60) @@ -30,6 +30,7 @@ using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Exceptions; using Ringtoets.Common.Primitives; +using RingtoetsCommonDataResources = Ringtoets.Common.Data.Properties.Resources; namespace Ringtoets.GrassCoverErosionInwards.Data { @@ -281,14 +282,14 @@ return FailureMechanismAssemblyResultFactory.CreateNotApplicableAssembly(); } - IAssemblyToolCalculatorFactory calculatorFactory = AssemblyToolCalculatorFactory.Instance; - AssemblyCategoriesInput assemblyCategoriesInput = CreateAssemblyCategoriesInput(failureMechanism, assessmentSection); - IEnumerable sectionAssemblies = failureMechanism.SectionResults - .Select(sr => GetSectionAssembly(sr, failureMechanism, assessmentSection)) - .ToArray(); - try { + IAssemblyToolCalculatorFactory calculatorFactory = AssemblyToolCalculatorFactory.Instance; + AssemblyCategoriesInput assemblyCategoriesInput = CreateAssemblyCategoriesInput(failureMechanism, assessmentSection); + IEnumerable sectionAssemblies = failureMechanism.SectionResults + .Select(sr => GetSectionAssembly(sr, failureMechanism, assessmentSection)) + .ToArray(); + IFailureMechanismAssemblyCalculator calculator = calculatorFactory.CreateFailureMechanismAssemblyCalculator(AssemblyToolKernelFactory.Instance); @@ -298,6 +299,10 @@ { throw new AssemblyException(e.Message, e); } + catch (AssemblyException e) + { + throw new AssemblyException(RingtoetsCommonDataResources.FailureMechanismAssemblyFactory_Error_while_assembling_failureMechanism, e); + } } ///