Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructuresFailureMechanismAssemblyFactory.cs =================================================================== diff -u -r2c4456778007600b5f89d4ee79ef181d4a12b63f -r42750c3eeb3410d3cd559ac0cb1a899efbaa1659 --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructuresFailureMechanismAssemblyFactory.cs (.../ClosingStructuresFailureMechanismAssemblyFactory.cs) (revision 2c4456778007600b5f89d4ee79ef181d4a12b63f) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructuresFailureMechanismAssemblyFactory.cs (.../ClosingStructuresFailureMechanismAssemblyFactory.cs) (revision 42750c3eeb3410d3cd559ac0cb1a899efbaa1659) @@ -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.ClosingStructures.Data { @@ -282,14 +283,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); @@ -299,6 +300,10 @@ { throw new AssemblyException(e.Message, e); } + catch (AssemblyException e) + { + throw new AssemblyException(RingtoetsCommonDataResources.FailureMechanismAssemblyFactory_Error_while_assembling_failureMechanism, e); + } } /// Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructuresFailureMechanismAssemblyFactoryTest.cs =================================================================== diff -u -rb85e01707b64280b3aa8a16acd1994c0c2ee1c04 -r42750c3eeb3410d3cd559ac0cb1a899efbaa1659 --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructuresFailureMechanismAssemblyFactoryTest.cs (.../ClosingStructuresFailureMechanismAssemblyFactoryTest.cs) (revision b85e01707b64280b3aa8a16acd1994c0c2ee1c04) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructuresFailureMechanismAssemblyFactoryTest.cs (.../ClosingStructuresFailureMechanismAssemblyFactoryTest.cs) (revision 42750c3eeb3410d3cd559ac0cb1a899efbaa1659) @@ -1102,8 +1102,8 @@ // Assert var exception = Assert.Throws(call); Exception innerException = exception.InnerException; - Assert.IsInstanceOf(innerException); - Assert.AreEqual(innerException.Message, exception.Message); + Assert.IsInstanceOf(innerException); + Assert.AreEqual("Voor een of meerdere vakken kan geen resultaat worden bepaald.", exception.Message); mocks.VerifyAll(); } } Index: Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.Designer.cs =================================================================== diff -u -ra5115968c170dddb9ef42d207adcc4195cacc892 -r42750c3eeb3410d3cd559ac0cb1a899efbaa1659 --- Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision a5115968c170dddb9ef42d207adcc4195cacc892) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 42750c3eeb3410d3cd559ac0cb1a899efbaa1659) @@ -443,6 +443,15 @@ } /// + /// Looks up a localized string similar to Voor een of meerdere vakken kan geen resultaat worden bepaald.. + /// + public static string FailureMechanismAssemblyFactory_Error_while_assembling_failureMechanism { + get { + return ResourceManager.GetString("FailureMechanismAssemblyFactory_Error_while_assembling_failureMechanism", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Vv->VIv. /// public static string FailureMechanismCategoryType_FactorizedLowerLimitNorm_DisplayName { Index: Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.resx =================================================================== diff -u -ra5115968c170dddb9ef42d207adcc4195cacc892 -r42750c3eeb3410d3cd559ac0cb1a899efbaa1659 --- Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.resx (.../Resources.resx) (revision a5115968c170dddb9ef42d207adcc4195cacc892) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.resx (.../Resources.resx) (revision 42750c3eeb3410d3cd559ac0cb1a899efbaa1659) @@ -423,4 +423,7 @@ Categorie {0} + + Voor een of meerdere vakken kan geen resultaat worden bepaald. + \ No newline at end of file