Index: Ringtoets/Common/src/Ringtoets.Common.IO/ReferenceLineWriter.cs =================================================================== diff -u -r58e275211395fc690df2706ccdaff082ecf7b544 -r02cd0d1c2a271dd7cab5c3a1cc345b0627a9b221 --- Ringtoets/Common/src/Ringtoets.Common.IO/ReferenceLineWriter.cs (.../ReferenceLineWriter.cs) (revision 58e275211395fc690df2706ccdaff082ecf7b544) +++ Ringtoets/Common/src/Ringtoets.Common.IO/ReferenceLineWriter.cs (.../ReferenceLineWriter.cs) (revision 02cd0d1c2a271dd7cab5c3a1cc345b0627a9b221) @@ -51,14 +51,6 @@ /// Thrown when the shapefile cannot be written. public void WriteReferenceLine(ReferenceLine referenceLine, string id, string filePath) { - if (referenceLine == null) - { - throw new ArgumentNullException("referenceLine"); - } - if (id == null) - { - throw new ArgumentNullException("id"); - } if (filePath == null) { throw new ArgumentNullException("filePath"); @@ -80,11 +72,21 @@ /// for the new object. /// The id of the assessment section to which the reference line is associated. /// A new instance of . + /// Thrown when or + /// is null. /// Thrown when is empty or consists of whitespace. private static MapLineData CreateMapLineData(ReferenceLine referenceLine, string id) { - if (id.Length == 0 || string.IsNullOrWhiteSpace(id)) + if (referenceLine == null) { + throw new ArgumentNullException("referenceLine"); + } + if (id == null) + { + throw new ArgumentNullException("id"); + } + if (string.IsNullOrWhiteSpace(id)) + { throw new ArgumentException("id"); }