Index: Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/CalculationConfigurationImporter.cs
===================================================================
diff -u -r3fa1f22b25a81f42d033e29e29d57e362eff8662 -rd1da05ec938b495861737b25df84127a399e70a5
--- Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/CalculationConfigurationImporter.cs (.../CalculationConfigurationImporter.cs) (revision 3fa1f22b25a81f42d033e29e29d57e362eff8662)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/CalculationConfigurationImporter.cs (.../CalculationConfigurationImporter.cs) (revision d1da05ec938b495861737b25df84127a399e70a5)
@@ -144,6 +144,12 @@
}
}
+ ///
+ /// Parses the read configuration item.
+ ///
+ /// The read item to parse.
+ /// A parsed calculation item.
+ /// Thrown when the item to parse is not valid.
private ICalculationBase ParseReadConfigurationItem(IReadConfigurationItem readConfigurationItem)
{
var readCalculationGroup = readConfigurationItem as ReadCalculationGroup;
@@ -158,9 +164,16 @@
return ParseReadCalculation(readCalculation);
}
- return null;
+ throw new InvalidOperationException("Can't parse item that is not a calculation or calculation group.");
}
+ ///
+ /// Parses the read calculation group and it's children.
+ ///
+ /// The calculation group to parse.
+ /// A parsed calculation group.
+ /// Thrown when the one of the children
+ /// to parse is not valid.
private CalculationGroup ParseReadCalculationGroup(ReadCalculationGroup readCalculationGroup)
{
var calculationGroup = new CalculationGroup(readCalculationGroup.Name, true);