Index: Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/CalculationConfigurationImporter.cs =================================================================== diff -u -r1144837cd4defc65250e08e83d9ab8583324e21b -r3fa1f22b25a81f42d033e29e29d57e362eff8662 --- Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/CalculationConfigurationImporter.cs (.../CalculationConfigurationImporter.cs) (revision 1144837cd4defc65250e08e83d9ab8583324e21b) +++ Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/CalculationConfigurationImporter.cs (.../CalculationConfigurationImporter.cs) (revision 3fa1f22b25a81f42d033e29e29d57e362eff8662) @@ -26,7 +26,6 @@ using Core.Common.IO.Readers; using log4net; using Ringtoets.Common.Data.Calculation; -using Ringtoets.Common.IO.Exceptions; using Ringtoets.Common.IO.Properties; using Ringtoets.Common.IO.Readers; @@ -113,28 +112,9 @@ /// Parses a calculation from the provided . /// /// The calculation read from XML. - /// A parsed calculation instance. - /// Thrown when something goes wrong while parsing. + /// A parsed calculation instance, or null when something goes wrong while parsing. protected abstract ICalculation ParseReadCalculation(TReadCalculation readCalculation); - /// - /// Performs the provided and handles any thrown . - /// - /// The action to perform. - /// The error message to provide when rethrowing any thrown . - /// Thrown when throws an . - protected static void PerformActionHandlingAnyArgumentOutOfRangeException(Action action, string errorMessage) - { - try - { - action(); - } - catch (ArgumentOutOfRangeException e) - { - throw new CriticalFileValidationException($"{errorMessage} {e.Message}"); - } - } - protected void LogOutOfRangeException(string errorMessage, string calculationName, ArgumentOutOfRangeException e) { LogReadCalculationConversionError($"{errorMessage} {e.Message}", calculationName); @@ -175,7 +155,7 @@ var readCalculation = readConfigurationItem as TReadCalculation; if (readCalculation != null) { - return ParseReadCalculationInternal(readCalculation); + return ParseReadCalculation(readCalculation); } return null; @@ -197,19 +177,6 @@ return calculationGroup; } - private ICalculation ParseReadCalculationInternal(TReadCalculation readCalculation) - { - try - { - return ParseReadCalculation(readCalculation); - } - catch (CriticalFileValidationException e) - { - LogReadCalculationConversionError(e.Message, readCalculation.Name); - return null; - } - } - private void AddItemsToModel(IEnumerable parsedCalculationItems) { foreach (ICalculationBase parsedCalculationItem in parsedCalculationItems)